C# Class Apache.NMS.ActiveMQ.MessageConsumer

An object capable of receiving messages from some destination
Inheritance: IMessageConsumer, IDispatcher
Datei anzeigen Open project: ThorTech/apache-nms Class Usage Examples

Protected Properties

Property Type Description
disposed bool

Private Properties

Property Type Description
AckLater void
Acknowledge void
CheckClosed void
CheckMessageListener void
ClearMessagesInProgress void
Commit void
CreateActiveMQMessage Apache.NMS.ActiveMQ.Commands.ActiveMQMessage
Dequeue Apache.NMS.ActiveMQ.Commands.MessageDispatch
DoClose void
InProgressClearRequired void
MakeAckForAllDeliveredMessages Apache.NMS.ActiveMQ.Commands.MessageAck
MessageConsumer System
Rollback void
RollbackHelper void
Shutdown void

Public Methods

Method Description
AfterMessageIsConsumed ( MessageDispatch dispatch, bool expired ) : void
BeforeMessageIsConsumed ( MessageDispatch dispatch ) : void
Close ( ) : void
DeliverAcks ( ) : void
Dispatch ( MessageDispatch dispatch ) : void
Dispose ( ) : void
Iterate ( ) : bool
Receive ( ) : IMessage
Receive ( System.TimeSpan timeout ) : IMessage
ReceiveNoWait ( ) : IMessage
Start ( ) : void
Stop ( ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void
DoClientAcknowledge ( ActiveMQMessage message ) : void
DoIndividualAcknowledge ( ActiveMQMessage message ) : void
DoNothingAcknowledge ( ActiveMQMessage message ) : void
SendPullRequest ( long timeout ) : void

Private Methods

Method Description
AckLater ( MessageDispatch dispatch, AckType type ) : void
Acknowledge ( ) : void
CheckClosed ( ) : void
CheckMessageListener ( ) : void
ClearMessagesInProgress ( ) : void
Commit ( ) : void
CreateActiveMQMessage ( MessageDispatch dispatch ) : ActiveMQMessage
Dequeue ( System.TimeSpan timeout ) : MessageDispatch

Used to get an enqueued message from the unconsumedMessages list. The amount of time this method blocks is based on the timeout value. if timeout == Timeout.Infinite then it blocks until a message is received. if timeout == 0 then it it tries to not block at all, it returns a message if it is available if timeout > 0 then it blocks up to timeout amount of time. Expired messages will consumed by this method.

DoClose ( ) : void
InProgressClearRequired ( ) : void
MakeAckForAllDeliveredMessages ( AckType type ) : MessageAck
MessageConsumer ( Session session, ConsumerId id, ActiveMQDestination destination, String name, String selector, int prefetch, int maxPendingMessageCount, bool noLocal, bool browser, bool dispatchAsync ) : System
Rollback ( ) : void
RollbackHelper ( Object arg ) : void
Shutdown ( ) : void

Called from the parent Session of this Consumer to indicate that its parent session is closing and this Consumer should close down but not send any message to the Broker as the parent close will take care of removing its child resources at the broker.

Method Details

AfterMessageIsConsumed() public method

public AfterMessageIsConsumed ( MessageDispatch dispatch, bool expired ) : void
dispatch Apache.NMS.ActiveMQ.Commands.MessageDispatch
expired bool
return void

BeforeMessageIsConsumed() public method

public BeforeMessageIsConsumed ( MessageDispatch dispatch ) : void
dispatch Apache.NMS.ActiveMQ.Commands.MessageDispatch
return void

Close() public method

public Close ( ) : void
return void

DeliverAcks() public method

public DeliverAcks ( ) : void
return void

Dispatch() public method

public Dispatch ( MessageDispatch dispatch ) : void
dispatch Apache.NMS.ActiveMQ.Commands.MessageDispatch
return void

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

DoClientAcknowledge() protected method

protected DoClientAcknowledge ( ActiveMQMessage message ) : void
message Apache.NMS.ActiveMQ.Commands.ActiveMQMessage
return void

DoIndividualAcknowledge() protected method

protected DoIndividualAcknowledge ( ActiveMQMessage message ) : void
message Apache.NMS.ActiveMQ.Commands.ActiveMQMessage
return void

DoNothingAcknowledge() protected method

protected DoNothingAcknowledge ( ActiveMQMessage message ) : void
message Apache.NMS.ActiveMQ.Commands.ActiveMQMessage
return void

Iterate() public method

public Iterate ( ) : bool
return bool

Receive() public method

public Receive ( ) : IMessage
return IMessage

Receive() public method

public Receive ( System.TimeSpan timeout ) : IMessage
timeout System.TimeSpan
return IMessage

ReceiveNoWait() public method

public ReceiveNoWait ( ) : IMessage
return IMessage

SendPullRequest() protected method

protected SendPullRequest ( long timeout ) : void
timeout long
return void

Start() public method

public Start ( ) : void
return void

Stop() public method

public Stop ( ) : void
return void

Property Details

disposed protected_oe property

protected bool disposed
return bool