Show / Hide Table of Contents

# Class Dispatcher

Handles the multi-threaded dispatching between the transport and the consumers

##### Inheritance

System.Object
Dispatcher

##### Inherited Members

System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()

###### Namespace: ActiveMQ

###### Assembly: Apache.NMS.ActiveMQ.dll

##### Syntax

    public class Dispatcher

### Methods

| Improve this Doc View Source

#### Dequeue()

Method Dequeue

##### Declaration

    public IMessage Dequeue()

##### Returns

Type | Description
--- | ---
Apache.NMS.IMessage |

| Improve this Doc View Source

#### Dequeue(TimeSpan)

Method Dequeue

##### Declaration

    public IMessage Dequeue(TimeSpan timeout)

##### Parameters

Type | Name | Description
--- | --- | ---
System.TimeSpan | timeout |

##### Returns

Type | Description
--- | ---
Apache.NMS.IMessage |

| Improve this Doc View Source

#### DequeueNoWait()

Method DequeueNoWait

##### Declaration

    public IMessage DequeueNoWait()

##### Returns

Type | Description
--- | ---
Apache.NMS.IMessage |

| Improve this Doc View Source

#### Enqueue(ActiveMQMessage)

Method Enqueue

##### Declaration

    public void Enqueue(ActiveMQMessage message)

##### Parameters

Type | Name | Description
--- | --- | ---
ActiveMQMessage | message |

| Improve this Doc View Source

#### PulseSemaphore()

##### Declaration

    protected void PulseSemaphore()

| Improve this Doc View Source

#### Redeliver(ActiveMQMessage)

Redeliver the given message, putting it at the head of the queue

##### Declaration

    public void Redeliver(ActiveMQMessage message)

##### Parameters

Type | Name | Description
--- | --- | ---
ActiveMQMessage | message |

| Improve this Doc View Source

#### RedeliverRolledBackMessages()

Whem we start a transaction we must redeliver any rolled back messages

##### Declaration

    public void RedeliverRolledBackMessages()

| Improve this Doc View Source

#### SetAsyncDelivery(AutoResetEvent)

##### Declaration

    public void SetAsyncDelivery(AutoResetEvent eventHandle)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Threading.AutoResetEvent | eventHandle |