private static Acknowledge getAcknowledgeMessage(NetMessage message)
        {
            NetAcknowledge netAck = message.Action.AcknowledgeMessage;

            Acknowledge ack = new Acknowledge();

            ack.Action_id   = netAck.ActionId;
            ack.Destination = netAck.Destination;
            ack.Message_id  = netAck.MessageId;

            return(ack);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Acknowledge a queue message.
        /// </summary>
        /// <param name="quequeName">Queue name (e.g. "/queue/foo" or "myQueue@/topic/foo").</param>
        /// <param name="messageId">The received message identifier.</param>
        /// <param name="acceptRequest">An AcceptRequest instance.</param>
        public void Acknowledge(string quequeName, string messageId, AcceptRequest acceptRequest)
        {
            if (IsClosed())
            {
                return;
            }
            NetAcknowledge netAck = new NetAcknowledge(quequeName, messageId);
            NetAction      action = new NetAction(NetAction.ActionType.ACKNOWLEDGE);

            action.AcknowledgeMessage = netAck;
            NetMessage netMessage = new NetMessage(action);

            protocolHandler.HandleOutgoingMessage(netMessage, acceptRequest);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Acknowledge a queue message.
        /// </summary>
        /// <param name="quequeName">Queue name (e.g. "/queue/foo" or "myQueue@/topic/foo").</param>
        /// <param name="messageId">The received message identifier.</param>
        /// <param name="acceptRequest">An AcceptRequest instance.</param>
        public void Acknowledge(string quequeName, string messageId, AcceptRequest acceptRequest)
        {
            if (IsClosed())
                return;
            NetAcknowledge netAck = new NetAcknowledge(quequeName, messageId);
            NetAction action = new NetAction(NetAction.ActionType.ACKNOWLEDGE);
            action.AcknowledgeMessage = netAck;
            NetMessage netMessage = new NetMessage(action);

            protocolHandler.HandleOutgoingMessage(netMessage, acceptRequest);
        }