Skip to content

AnyQ.Queues

Stephen Collins edited this page Feb 8, 2018 · 3 revisions

IJobQueueFactory

Provides methods for creating a AnyQ.Queues.JobQueue

public interface AnyQ.Queues.IJobQueueFactory

Methods

Type Name Summary
JobQueue Create(HandlerConfiguration handlerConfiguration) Create a new AnyQ.Queues.JobQueue for the specified queue

IJobQueueReceiver

Provides methods for receiving messages on a queue and producing AnyQ.Jobs.ProcessingRequests

public interface AnyQ.Queues.IJobQueueReceiver

Events

Type Name Summary
EventHandler<JobReceivedEventArgs> JobReceived Fired when a AnyQ.Jobs.ProcessingRequest is generated from an AnyQ.Queues.IMessage

Methods

Type Name Summary
void Close() Stop listening and close the queue
void StartListening() Start listening for jobs on the queue

IJobQueueSender

Provides methods for sending jobs to an AnyQ.Queues.IMessageQueue

public interface AnyQ.Queues.IJobQueueSender

Methods

Type Name Summary
IMessage SendJob(String type, Object payload, String messageLabel) Send a message to the queue

IMessage

Describes the content of a message

public interface AnyQ.Queues.IMessage

Properties

Type Name Summary
Stream BodyStream System.IO.Stream containing the message data (a JobRequest object)
String Id Unique identifier for the message
String Label Human-readable name for the message

IMessageFactory

Provides methods for creating AnyQ.Queues.IMessage instances for use in an AnyQ.Queues.IMessageQueue

public interface AnyQ.Queues.IMessageFactory

Methods

Type Name Summary
IMessage Create(Stream bodyStream, String label) Create an AnyQ.Queues.IMessage with the provided System.IO.Stream for creating the body

IMessageQueue

Represents a queue that sends and receives AnyQ.Queues.IMessages

public interface AnyQ.Queues.IMessageQueue
    : IDisposable

Properties

Type Name Summary
String Id Unique identifier for the queue
String Name Human-readable name for the queue

Events

Type Name Summary
EventHandler<ReceivedMessageEventArgs> ReceivedMessage Fired when an AnyQ.Queues.IMessage is received

Methods

Type Name Summary
void BeginReceive() Begin listening to the queue
void DeleteMessage(String messageId) Delete a specific message from the queue
void EndRecieve() Stop listening and close the queue
IMessage GetMessage(String messageId) Get a specific message from the queue
IEnumerable<IMessage> GetMessages() Get all messages from the queue
void Purge() Delete all messages from the queue
void Receive(String messageId) Receive a message by unique ID
void Receive() Receive a message by unique ID
IMessage Send(IMessage message) Push a message onto the queue

IMessageQueueFactory

Provides methods for generating instances of AnyQ.Queues.IMessageQueue

public interface AnyQ.Queues.IMessageQueueFactory

Methods

Type Name Summary
IMessageQueue Create(QueueCreationOptions options) Create an AnyQ.Queues.IMessageQueue with the specified unique Id and human-readable name
Boolean Exists(String queueId) Check if the a queue with the specified unique identifier exists

IRequestSerializer

Provides mechanisms for converting a AnyQ.Jobs.JobRequest to and from a System.IO.Stream for use in an AnyQ.Queues.IMessage.BodyStream

public interface AnyQ.Queues.IRequestSerializer

Methods

Type Name Summary
JobRequest Deserialize(Stream request) Deserialize a System.IO.Stream from an AnyQ.Queues.IMessage.BodyStream into a AnyQ.Jobs.JobRequest
Stream Serialize(JobRequest request) Serialize the AnyQ.Jobs.JobRequest into a System.IO.Stream

JobQueue

Represents a wrapper around an AnyQ.Queues.IMessageQueue for handling serialization of payloads and creation of AnyQ.Jobs.ProcessingRequests

public class AnyQ.Queues.JobQueue
    : IDisposable

Properties

Type Name Summary
String QueueId Unique identifier for the queue

Events

Type Name Summary
EventHandler<JobReceivedEventArgs> JobReceived Fired when a job is received

Methods

Type Name Summary
void Close() Close the connection to the queue and stop listening
void DeleteMessage(String messageId) Delete a specific message from the queue
void Dispose(Boolean disposing) Release all resources used by the AnyQ.Queues.JobQueue
void Dispose() Release all resources used by the AnyQ.Queues.JobQueue
IMessage GetMessage(String messageId) Get a specific message from the queue
IEnumerable<IMessage> GetMessages() Get all messages from the queue
ProcessingRequest GetProcessingRequest(String messageId) Get a AnyQ.Jobs.ProcessingRequest for the specified message
void OnReceivedJob(Object sender, ReceivedMessageEventArgs e) Executed when a job arrives on the queue
void Purge() Delete all messages from the queue
void ReceiveMessage(String messageId) Receive a message by AnyQ.Queues.IMessage.Id
void ReceiveMessage() Receive a message by AnyQ.Queues.IMessage.Id
IMessage SendJob(String type, Object payload, String messageLabel) Send a new AnyQ.Jobs.JobRequest (serialized into an AnyQ.Queues.IMessage) to the queue handled by this instance
void StartListening() Begin listening for AnyQ.Queues.IMessages on the AnyQ.Queues.IMessageQueue
String ToString() Returns a string that describes the AnyQ.Queues.JobQueue

JobReceivedEventArgs

Represents event data for receiving a job on a AnyQ.Queues.JobQueue

public class AnyQ.Queues.JobReceivedEventArgs
    : EventArgs

Properties

Type Name Summary
ProcessingRequest ProcessingRequest Request generated from the received AnyQ.Queues.IMessage

QueueCreationOptions

Defines options for creating AnyQ.Queues.IMessageQueue objects

public class AnyQ.Queues.QueueCreationOptions

Properties

Type Name Summary
String QueueId Unique Id for the AnyQ.Queues.IMessageQueue
String QueueName Human-readable name for the AnyQ.Queues.IMessageQueue
Nullable<TimeSpan> ThrottleInterval Rate at which the queue receives jobs

ReceivedMessageEventArgs

Represents event data for an AnyQ.Queues.IMessageQueue receiving a message

public class AnyQ.Queues.ReceivedMessageEventArgs
    : EventArgs

Properties

Type Name Summary
IMessage Message Message received from queue
Clone this wiki locally