activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Gomes <e.se...@gmail.com>
Subject Re: C# Consumers Disconnecting
Date Mon, 27 Aug 2012 22:45:22 GMT
One thing you didn't mention that could be helpful is whether you are using
the failover protocol.  I would think that any network interruption would
be handled by the failover layer and automatically reconnect the consumer.

Other than that, have you noticed any pattern to the connection, such as it
disconnects after the same duration, or after the same number of messages
consumed, etc.

On Mon, Aug 27, 2012 at 12:48 PM, TrainTime <zzuzack1@gmail.com> wrote:

>             I've been trying to figure out this problem I've been having
> with
> apache NMS for at least a week now, so I decided maybe I would try to post
> here and see if anyone has experienced similar issues.  In my situation, we
> have about 5-7 producers all producing to one topic, and then we have one
> consumer consuming data from the same topic.  However, this singular
> consumer will suddenly disconnect from the broker with no indication to me
> (that i've been able to find) and stop receiving anything, the only way to
> tell is by checking the broker and seeing that the topic has no consumers.
> I
> have been searching around these forums for a solution and here's a few
> things I tried that didn't seem to make any difference:
>
>          1. Set ?wireFormat.maxInactivityDuration=0 on my openWire
> transport
> connector
>          2. Set my IConnection and ISession to be auto acknowledge
>          3. Changed the memory limit of topics to 100mb from 1 mb
>          4. Call IMessage.Acknowledge after receiving a message
>          5. Changed IConnection and ISession to be persistent object along
> with the consumer
>
>       I'm not sure what else at this point I have to try.  I'm using
> activeMQ 5.6 SNAPSHOT which runs as a service, Apache.NMS 1.5.1.2739, and
> Apache.NMS.ActiveMQ 1.5.6.2746.  Also one last thing, here's how I'm
> creating my consumer in the C# code:
>
>  //setup jms
>                         IConnectionFactory factory = new
> ConnectionFactory(_connectURI);
>
>                         _connection = factory.CreateConnection();
>                         _connection.AcknowledgementMode =
> AcknowledgementMode.AutoAcknowledge;
>                         _connection.ConnectionInterruptedListener +=
> ConnectionLost;
>
>                         _connection.Start();
>                         _session =
> _connection.CreateSession(AcknowledgementMode.AutoAcknowledge);
>
>                         _consumer = _session.CreateConsumer(new
> Apache.NMS.ActiveMQ.Commands.ActiveMQTopic(_topicName));
>                         _consumer.Listener += ProcessItem;
>
>                         _status.Status = ConnectorStatus.Running;
>                         _status.Details = "JMS Connector is running";
>
>
> And here's what the consumer listener function looks like:
>
> public void ProcessItem(IMessage message)
>         {
>             message.Acknowledge();
>              /*  code */
>          }
>
>
> I also tried looking at Apache logging a bit, but it didn't seem to output
> anything useful.  I think I need to change what its logging, is ERROR the
> correct syntax for the sl4j logging properties file?  Thanks in advance for
> any help anyone can offer, this has been driving me nuts ><
>
>
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/C-Consumers-Disconnecting-tp4655632.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message