osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C# NMS Submission


I'm getting the "Channel was inactive for too long" message from my C#
program. Can I send messages from the most recent version of NMS to an older
server version? We have AMQ Server version 5.5.1 (but it's a "fuse" version
of the server). It fails on the "using (ISession session =
connection.CreateSession(AcknowledgementMode.AutoAcknowledge))" statement in
my code.

All details below...

Apache.NMS Version is 1.7.1.3894
Apache.NMS.ActiveMQ Version is 1.7.2.4108

AMQ server version is : 5.5.1-fuse-03-06

*Constructed URL is:*
activemq:tcp://actimrtstappz07.xchanginghosting.com:8080/?transport.sendTimeout=0&wireFormat.maxInactivityDuration=0&maxInactivityDurationInitalDelay=10000

*Exception is :*
Apache.NMS.ActiveMQ.IOException
  HResult=0x80131500
  Message=Channel was inactive for too long:
tcp://actimrtstappz07.xchanginghosting.com:8080/
  Source=Apache.NMS.ActiveMQ
  StackTrace:
   at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.Oneway(Command
command)
   at Apache.NMS.ActiveMQ.Transport.WireFormatNegotiator.Oneway(Command
command)
   at Apache.NMS.ActiveMQ.Transport.MutexTransport.Oneway(Command command)
   at Apache.NMS.ActiveMQ.Transport.ResponseCorrelator.AsyncRequest(Command
command)
   at Apache.NMS.ActiveMQ.Transport.ResponseCorrelator.Request(Command
command, TimeSpan timeout)
   at Apache.NMS.ActiveMQ.Connection.CheckConnected()
   at
Apache.NMS.ActiveMQ.Connection.CreateActiveMQSession(AcknowledgementMode
ackMode)
   at Apache.NMS.ActiveMQ.Connection.CreateSession(AcknowledgementMode
sessionAcknowledgementMode)
   at ETLib.TETPlayer.SendNewMessageQueue(TETPlayerMessage pm) in
C:\ET\ETLib\Player\TETPlayer.cs:line 186
   at ETLib.TETPlayer.TimerTick(DateTime time) in
C:\ET\ETLib\Player\TETPlayer.cs:line 160
   at TelerikWpfApp1.Presenters.PlayerPresenter.TimerTick(DateTime time) in
C:\ET\TelerikWpfApp1\Presenters\Player\PlayerPresenter.cs:line 63
   at TelerikWpfApp1.Views.PlayerView.TimerTick(Object sender, EventArgs e)
in C:\ET\TelerikWpfApp1\Views\Player\PlayerView.xaml.cs:line 22
   at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate
callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source,
Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

*Code extract:*
Uri brokerUri = new Uri(pm.Sequence.TargetEnvironment.URI);
string queueName = pm.Sequence.TargetEnvironment.Queue;


Apache.NMS.NMSConnectionFactory factory = new
NMSConnectionFactory(brokerUri);

using (IConnection connection = factory.CreateConnection())
{

                connection.RequestTimeout = TimeSpan.FromSeconds(0);
                connection.RedeliveryPolicy.InitialRedeliveryDelay = 0;

                connection.AcknowledgementMode =
AcknowledgementMode.AutoAcknowledge;

                using (ISession session =
connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
                {

                    IDestination destination = session.GetQueue(queueName);

                    using (IMessageProducer producer =
session.CreateProducer(destination))
                    {
                        
                        
                        producer.DeliveryMode = MsgDeliveryMode.Persistent;
                        producer.RequestTimeout = TimeSpan.FromSeconds(0);


                        connection.Start();





--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-f2368404.html