7 Replies Latest reply on Mar 1, 2004 2:20 AM by daniel-

    queues and receivers

    daniel-

      hi,

      is it possible that when you have a queue, and put a receiver on it, and if another receiver try to connect to the queue, to do that way that the last one receive the message and not the first one?

      of course it s not a topic but a queue. and that way there is still only receiver, only i would like is that the last one get the message ...

        • 1. Re: queues and receivers
          daniel-

          ok resolved,

          did a bad thing, but when a second is connected to the queue , the last connected would get the message ...

          the problem now is if the first receiver wasn t killed, and the second one is killed, and if a third receiver is started, it is not the last connect, here the third receiver, but the first receiver will get the message

          if anyone can undesrtand that ... is there a solution that way we can be sure, that only the last connected receiver will get the message .... ???

          • 2. Re: queues and receivers
            daniel-

            sorry for replying to my self, and reposting ...

            but i dunno if it is a problem in JBoss ...

            as i have tried to explain before, about starting new receivers, even if there is already one ...
            there is no problem if there is no current transaction, the last started will get the hand on the first one ... but now if a transaction is started in the first receiverand is not yet finished, and another receiver starts, than after the transaction is finished in the first one ... that make a problem, because the second one would not receive messages, but still the first one ...

            is there any solution to that ...

            i ve tested it on Jboss 3.2.3 and 4.0, it is the same thing

            • 3. Re: queues and receivers
              dannyyates

              I think you misunderstand JMS. You can have many receivers all receiving messages from the same queue. Each message will go to one receiver, and the spec states that the decision about which receiver is "random".

              • 4. Re: queues and receivers
                daniel-

                ohhh i didn t understand ...
                thanx for that advice

                • 5. Re: queues and receivers
                  daniel-

                  ok that is the definition of JMS, but now how does JBoss work? when i start a second receiver, it is the second that always receive ... but in the middle of a transaction the first receiver keep the hand, but can not find how is Jboss working ...

                  • 6. Re: queues and receivers
                    daniel-

                    got the answer, it is the same thing for JBoss

                    • 7. Re: queues and receivers
                      daniel-

                      but the question is now, how to do when you got 2 receivers, that only and only one of them will recive every messages ???