Re: C# NMS Submission

2018-08-13 Thread Arthur Naseef
I don't expect username and password to affect inactivity timeouts.

Inactivity timeouts should only occur when the TCP connection between the
client and broker is somehow excessively slow or stuck (e.g. if packets are
not crossing the network properly).

Versions of the client and server should not be an issue, although there
_have_ been cases where different versions have caused problems.

Note that version 5.5.2 of the broker is very, very old.  Many bugs have
been fixed since then.

One thing to look at here is packet flow between the client and server.
WireShark or tcpdump could be very helpful here.

Hope this helps.

Art



On Tue, Aug 7, 2018 at 7:18 PM, raynera  wrote:

> I might be being stupid. Not creating my connection with a username &
> password. Will try again when I'm back in the office!
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-
> f2368404.html
>


Re: C# NMS Submission

2018-08-07 Thread raynera
I might be being stupid. Not creating my connection with a username &
password. Will try again when I'm back in the office!



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


C# NMS Submission

2018-08-07 Thread raynera
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=1

*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