Show / Hide Table of Contents

Interface IMessageSource

Defines the property and methods of a message source.

Namespace: Amqp.Listener
Assembly: Amqp.Net.dll
Syntax
public interface IMessageSource

Methods

DisposeMessage(ReceiveContext, DispositionContext)

Disposes the message by releasing any associated resources. This is called when a disposition frame is received from the peer.

Declaration
void DisposeMessage(ReceiveContext receiveContext, DispositionContext dispositionContext)
Parameters
Type Name Description
ReceiveContext receiveContext

The ReceiveContext object returned by the GetMessageAsync method.

DispositionContext dispositionContext

The DispositionContext object containing the disposition information.

Remarks

The implementation typically performs the following actions in this event. (1) release any internal state associated with the message found by receiveContext.UserToken. (2) complete the delivery by calling dispositionContext.Complete().

GetMessageAsync(ListenerLink)

Gets a message to send to the remote peer. The implementation may set a UserToken object so that internal state can be found by the context later.

Declaration
Task<ReceiveContext> GetMessageAsync(ListenerLink link)
Parameters
Type Name Description
ListenerLink link
Returns
Type Description
System.Threading.Tasks.Task<ReceiveContext>

The receive context for the outgoing delivery.

Remarks

Implementation must not throw exception. If a null context is returned and there are outstanding link credits, the library calls the method again.

Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX