7 Replies Latest reply on Sep 7, 2003 10:49 AM by adrian.brock

    Acknowledgement from receiver

    anithavs

      Hi,
      I would like to know is there a way the sender can know whether the message has been received by the receiver ie a kind of acknowledgement from receiver to sender. I am using dynamically created queues(with RMIAdaptor). And once the message has been received, i don't want the message to be persisted.
      Thanks
      Anitha

        • 1. Re: Acknowledgement from receiver

          It is not persisted once it is acknowledged.

          Regards,
          Adrian

          • 2. Re: Acknowledgement from receiver
            anithavs

            Hi Adrian.
            Thanks!!
            Is there a way sender can check whether message is sent to receiver. If there is any way, can u pls elaborate on that. B'cuz my requirement is, I'll be creating the queues as and when a user logins in with a specific role. And would be first creating queue for him with his userId. Then whenever a message is sent, he gets it if he's online. He might go offline/logoff also in between. So, if the receiver has gone off, the sender can keep trying for some specific times and on failure can remove that destination.
            How i can achieve this?
            Hope i've made things clear
            Thanks
            Anitha

            • 3. Re: Acknowledgement from receiver

              Sounds like a non durable topic subscription.
              If the user isn't subscribed to the topic, any messages
              sent to it are dropped.

              Regards,
              Adrian

              • 4. Re: Acknowledgement from receiver
                anithavs

                Hi Adrian,
                Thanks,
                Does the same thing (non durable topic) holds good for queue also?
                Anitha

                • 5. Re: Acknowledgement from receiver

                  No. Messages are retained hen nobody is listening.

                  Regards,
                  Adrian

                  • 6. Re: Acknowledgement from receiver
                    anithavs

                    Are the messages retained even if the queue is a dynamically created one like how i've created using RMIAdaptor.
                    i've created th queue like

                    RMIAdaptor server = (RMIAdaptor) jndiContext.lookup("jmx/rmi/RMIAdaptor");
                    server.invoke(new ObjectName("jboss.mq:service=DestinationManager"),
                    "createQueue",new Object[] { queueName },
                    new String[] { "java.lang.String" });
                    queueSession = queueConn.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
                    queue = queueSession.createQueue(queueName);


                    That means i don't 've any entries for that queue in jbossmq-destinations-service.xml file.
                    Thanks
                    Anitha

                    • 7. Re: Acknowledgement from receiver

                      It is still a permenant queue. So messages are persisted for
                      reliable delivery.

                      Regards,
                      Adrian