13 Replies Latest reply on Aug 14, 2007 1:05 PM by Burr Sutter

    MessageStore

    jw Newbie

      Hi

      I'm using the action

      org.jboss.soa.esb.actions.MessagePersister

      to store the message into an oracle database. Is it possible to store the content in a human readable form (e.g. a xml representation of the objects in the message)?
      Currently I have only a bulk of chars in it.

      The oracle table is created as

      CREATE TABLE MESSAGE
      (
       UUID VARCHAR2(128 BYTE) NOT NULL PRIMARY KEY,
       TYPE VARCHAR2(128 BYTE) NOT NULL,
       MESSAGE CLOB NOT NULL,
       DELIVERED VARCHAR2(10 BYTE) NOT NULL,
       CLASSIFICATION VARCHAR2(10 BYTE)
      )



      Is it possible the configure the name of the table? It seems that in the current implementation of the MessageStore its hard coded as 'message'.




      ( Little hint to org.jboss.soa.esb.actions.MessagePersister:
      I guess the attribute name should be classification, not classfication.)


        • 1. Re: MessageStore
          Kurt Stam Master

          I just noticed the other day we base64 encode it. I'm not sure why that decision was made. I'm tempted to take it out.. And not this is not configurable.

          --Kurt

          • 2. Re: MessageStore
            jw Newbie

            It would be nice to have the possibility to configure the table names of the esb infrastructure tables (MessageStore, juddi, ...) or (maybe better) to define a table name prefix for all theses tables. This would avoid conflicts with other tables used for the business logic.

            • 3. Re: MessageStore
              Mark Little Master

               

              "kurt.stam@jboss.com" wrote:
              I just noticed the other day we base64 encode it. I'm not sure why that decision was made. I'm tempted to take it out.. And not this is not configurable.


              You have to base64 encode it so arbitrary binary data is not screwed. Same reason we base64 encode the XML Objects prior to transmission.

              • 4. Re: MessageStore
                Mark Little Master

                 

                "jw.1" wrote:
                It would be nice to have the possibility to configure the table names of the esb infrastructure tables (MessageStore, juddi, ...) or (maybe better) to define a table name prefix for all theses tables. This would avoid conflicts with other tables used for the business logic.


                Sure. Create a JIRA. Thanks.

                • 5. Re: MessageStore
                  Mark Little Master

                   

                  "mark.little@jboss.com" wrote:
                  "kurt.stam@jboss.com" wrote:
                  I just noticed the other day we base64 encode it. I'm not sure why that decision was made. I'm tempted to take it out.. And not this is not configurable.


                  You have to base64 encode it so arbitrary binary data is not screwed. Same reason we base64 encode the XML Objects prior to transmission.


                  I should have added that I'm assuming we're not base64 encoding the Message again within the MessageStore. That should already have been done by the ESB when they were sent.

                  • 6. Re: MessageStore
                    Mark Little Master

                     

                    "juerg.weilenmann" wrote:
                    ( Little hint to org.jboss.soa.esb.actions.MessagePersister:
                    I guess the attribute name should be classification, not classfication.)


                    Thanks. Fixed in trunk.

                    • 7. Re: MessageStore
                      Kurt Stam Master

                      Message.serialize should take care of this?

                      1. If the message is Object based, java will serialize it for us. I see no problem there.

                      2. If the message is XML, and if we want to transport let's say images, then who ever sticks the image in will need to encode it. So once we HAVE the message we can simply serialize to XML. I mean I would want to see XML go over the wire (or in the store) not the entire message being encoded?

                      --Kurt

                      • 8. Re: MessageStore
                        Mark Little Master

                         

                        "mark.little@jboss.com" wrote:
                        "mark.little@jboss.com" wrote:
                        "kurt.stam@jboss.com" wrote:
                        I just noticed the other day we base64 encode it. I'm not sure why that decision was made. I'm tempted to take it out.. And not this is not configurable.


                        You have to base64 encode it so arbitrary binary data is not screwed. Same reason we base64 encode the XML Objects prior to transmission.


                        I should have added that I'm assuming we're not base64 encoding the Message again within the MessageStore. That should already have been done by the ESB when they were sent.


                        Bad assumption ;-) So I don't know why DBMessageStoreImpl does a base64 encoding either. In the situation where that encoding is needed, we've already done it elsewhere.

                        • 9. Re: MessageStore
                          Mark Little Master

                           

                          "kurt.stam@jboss.com" wrote:
                          Message.serialize should take care of this?

                          1. If the message is Object based, java will serialize it for us. I see no problem there.

                          2. If the message is XML, and if we want to transport let's say images, then who ever sticks the image in will need to encode it. So once we HAVE the message we can simply serialize to XML. I mean I would want to see XML go over the wire (or in the store) not the entire message being encoded?


                          See my latest post. Agree 100%. We already opaquely base64 encode the Message contents when they need to be (not the entire XML). So I think the MessageStore encoding in DBMessageStoreImpl is not needed. Unless someone can come up with something we're missing http://jira.jboss.com/jira/browse/JBESB-804.

                          • 10. Re: MessageStore
                            Barry Sheward Newbie

                            I think this might be a perfect example of how attachments could be assumed to need encoding, while the rest of the message could be assumed to be representable in readable XML?

                            • 11. Re: MessageStore
                              Burr Sutter Master

                              I would also like the XML portion of the message (assuming it is an XML-based message) in a human readable form.

                              I believe the MessageStore is also used for DLQ/DLS storage so making it human readable would be helpful in the "debugging" phase.

                              Burr

                              • 12. Re: MessageStore
                                jw Newbie

                                MessageStore-Action could be extended to allow to pass an 'Payload To Text' converter to store any message payload in a readable form into a CLOB field. In the current situation we have to implement a special action doing this.

                                • 13. Re: MessageStore
                                  Burr Sutter Master

                                  Would you mind at least posting a Jira related to this capability? And perhaps attached your custom action, if you believe it is generic enough for others to take advantage of it.

                                  This could be something that others in the community might be interested in working with you on.

                                  Burr