public QpidOutputChannel(BindingContext context, ClientSession session, EndpointAddress address) : base(context, address) { var encoderElement = context.Binding.Elements.Find<MessageEncodingBindingElement>(); if (encoderElement != null) { _encoder = encoderElement.CreateMessageEncoderFactory().Encoder; } _queueName = address.Uri.ToString(); _session = session; }
public QpidInputChannel(BindingContext context, ClientSession session, EndpointAddress address) : base(context, address) { _bindingElement = context.Binding.Elements.Find<QpidTransportBindingElement>(); var encoderElem = context.BindingParameters.Find<MessageEncodingBindingElement>(); if (encoderElem != null) { _encoder = encoderElem.CreateMessageEncoderFactory().Encoder; } _session = session; _queueName = address.Uri.ToString(); _queue = new BlockingQueue(); }
public IClientSession CreateSession(long expiryInSeconds) { Channel ch = _conn.GetChannel(); ClientSession ssn = new ClientSession(Encoding.UTF8.GetBytes(UUID.RandomUuid().ToString())); ssn.Attach(ch); ssn.SessionAttach(ssn.GetName()); ssn.SessionRequestTimeout(expiryInSeconds); return ssn; }