Forum Stats

  • 3,873,610 Users
  • 2,266,618 Discussions


will a message be consumed multiple times?

Johnny_hunter Member Posts: 106
edited Dec 15, 2011 3:34AM in Java Message Service (JMS)
Hello all:

I guess this question was asked before, for that I apologize, but I did a search and found nothing so far.

I am actually using solace as the message broker in my project. When a response is published on a topic, there are several waiting client instances listening to that topic. Are these consumers competing for whatever message published on this topic? Say, if instance#1 get the message first but this is not what it wants, will this message get lost in a black hole, or other instances still have a chance to get hold of it?

I guess this is a common scenario, so sorry for the naive question.



  • jtahlborn
    jtahlborn Member Posts: 2,040
    on a topic, all consumers receive the message. on a queue, only one consumer receives the message.
  • sorry for the late response.

    As I metioned I use solace systems, (, I should have looked for a more relevant forum but unfortunately I couldn't find one.

    I noticed something new in my latest tests, this is what I did:

    - start the server;
    - start the client;
    - client sends request to run a stored proc;
    - server runs the stored proc and sends 16 packages back to solace;
    - first time, client receives all 16 pkgs;
    - the same client sends the same request again, the 2nd time and the following attempts get fewer packages;
    - the server log shows all packages are still emitted each time.

    When the client sends the request, it publishes it to a topic. When the server sends back, it directly "reply" to the client.

    I am quite puzzled that how come some packages could even get lost.

    Could it be that the server sends the packages faster than the client can consume therefore some get lost? But in the 1st time of receiving all packages were received.

    Thanks for your thoughts,
  • 883902
    883902 Member Posts: 4
    Hi Johnny,

    According to your previous message, it looks like your application has an issues in the area which has not been implemented as JMS.
    This is not JMS specific issue at all.

    Why don't you involve JMS for the subscriber to send the message to publisher. This way you can be sure where exactly the issue is.

This discussion has been closed.