Skip to Content
avatar image
Former Member

JMSMessages

if we publish messages to Topic (or)Queue in jms, where we will find these messages rather than in database.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Oct 17, 2006 at 06:34 AM

    Hi Madan,

    If you publish a message to a topic it will be delivered to all topic subscribers listening to it whose selector matches the messages. If there are no subscribers at the moment of the sending it won't be delivered to anyone and you won't be able to see it anywhere. In fact in that case the server is smart enough to not even store it in the database since it won't be needed.

    In case of queue it will be delivered to one of the queue receivers. If there are not any at the moment of sending, whenever the first queue receiver registers itself and its selector is matching the message it will receive it.

    If you are playing around and experimenting with the JMS or the java web application server, you could try downloading the last version (NetWeaver Application Server, Java EE 5 Edition) :

    sap" target="_blank">https://www.sdn.sap.com/irj/sdn/developerareas/java?rid=/webcontent/uuid/28b1ed0e-0d01-0010-c887-a8fdecdb9053">sap [original link is broken] [original link is broken]

    HTH

    Peter

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Madan,

      they will be stored in the server database - table BC_JMSTOPIC. However if there are no valid topic subscribers

      (i.e. the messages are not needed) they will not be stored.

      If you want to see what is going on in your topic you could create a simple asynchronous standalone topic consumer (java program with main method) that inside its onMessage method would print "My message is "+ message

      HTH

      Peter