2 Replies Latest reply on Apr 29, 2016 7:59 AM by Ed Kaltenbach

    STOMP quits sending to all subscribers when one client disconnects

    Ed Kaltenbach Newbie

      Hello,

      I am using Wildfly 9.0 with the built-in HornetQ.  I configured HornetQ to support STOMP.  My clients are implemented in C#.  I am using the C# asynchronous socket classes/methods to connect to JMS/STOMP.  When I subscribe to a JMS topic, I use the following logic:

                  System.Text.StringBuilder strBuilder = new System.Text.StringBuilder();

                  strBuilder.Append("SUBSCRIBE\n");

                  strBuilder.Append("destination:" + destination + "\n");

                  strBuilder.Append("id:" + id + "\n");

                  strBuilder.Append("ack:auto\n");

                  strBuilder.Append("\n");

                  strBuilder.Append('\0');

                  SendMessageToStompSocket(strBuilder.ToString());

       

      All of my code seems to be working great.  I have multiple clients connecting via STOMP and all are able to send and receive messages.  The one issue I have occurs when one of my clients application closes.  When one client application shuts down, all of the other client applications quit receiving  messages.  If I start a new client application, as soon as it sends a SUBSCRIBE message then all of the client applications, that had previously send SUBSCRIBE messages, will begin receiving messages again from the subscribed JMS topic.

      I tried sending another SUBSCRIBE message when the messages stop, but I received a response from the server saying that I was already subscribed with that id.

       

      Has anybody else seen this behavior? 

       

      Does anybody have any suggestions how to fix or work around the problem?

       

      Having all of my clients stop receiving messages when I exit a single client is unacceptable.

       

      Thanks,

      Ed