Show / Hide Table of Contents

# Class MessageProducer

An object capable of sending messages to some destination

##### Inheritance

System.Object
MessageProducer

##### Implements

Apache.NMS.IMessageProducer
System.IDisposable

##### 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: Apache.NMS.ActiveMQ

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

##### Syntax

    public class MessageProducer : IMessageProducer, IDisposable

### Constructors

| Improve this Doc View Source

#### MessageProducer(Session, ProducerId, ActiveMQDestination, TimeSpan)

##### Declaration

    public MessageProducer(Session session, ProducerId id, ActiveMQDestination destination, TimeSpan requestTimeout)

##### Parameters

Type | Name | Description
--- | --- | ---
Session | session |
ProducerId | id |
ActiveMQDestination | destination |
System.TimeSpan | requestTimeout |

### Fields

| Improve this Doc View Source

#### disposed

##### Declaration

    protected bool disposed

##### Field Value

Type | Description
--- | ---
System.Boolean |

### Properties

| Improve this Doc View Source

#### DeliveryMode

##### Declaration

    public MsgDeliveryMode DeliveryMode { get; set; }

##### Property Value

Type | Description
--- | ---
Apache.NMS.MsgDeliveryMode |

| Improve this Doc View Source

#### DisableMessageID

##### Declaration

    public bool DisableMessageID { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### DisableMessageTimestamp

##### Declaration

    public bool DisableMessageTimestamp { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### Priority

##### Declaration

    public MsgPriority Priority { get; set; }

##### Property Value

Type | Description
--- | ---
Apache.NMS.MsgPriority |

| Improve this Doc View Source

#### ProducerId

##### Declaration

    public ProducerId ProducerId { get; }

##### Property Value

Type | Description
--- | ---
ProducerId |

| Improve this Doc View Source

#### ProducerInfo

##### Declaration

    public ProducerInfo ProducerInfo { get; }

##### Property Value

Type | Description
--- | ---
ProducerInfo |

| Improve this Doc View Source

#### ProducerTransformer

##### Declaration

    public ProducerTransformerDelegate ProducerTransformer { get; set; }

##### Property Value

Type | Description
--- | ---
Apache.NMS.ProducerTransformerDelegate |

| Improve this Doc View Source

#### RequestTimeout

##### Declaration

    public TimeSpan RequestTimeout { get; set; }

##### Property Value

Type | Description
--- | ---
System.TimeSpan |

| Improve this Doc View Source

#### TimeToLive

##### Declaration

    public TimeSpan TimeToLive { get; set; }

##### Property Value

Type | Description
--- | ---
System.TimeSpan |

### Methods

| Improve this Doc View Source

#### Close()

##### Declaration

    public void Close()

| Improve this Doc View Source

#### CreateBytesMessage()

##### Declaration

    public IBytesMessage CreateBytesMessage()

##### Returns

Type | Description
--- | ---
Apache.NMS.IBytesMessage |

| Improve this Doc View Source

#### CreateBytesMessage(Byte[])

##### Declaration

    public IBytesMessage CreateBytesMessage(byte[] body)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Byte[] | body |

##### Returns

Type | Description
--- | ---
Apache.NMS.IBytesMessage |

| Improve this Doc View Source

#### CreateMapMessage()

##### Declaration

    public IMapMessage CreateMapMessage()

##### Returns

Type | Description
--- | ---
Apache.NMS.IMapMessage |

| Improve this Doc View Source

#### CreateMessage()

##### Declaration

    public IMessage CreateMessage()

##### Returns

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

| Improve this Doc View Source

#### CreateObjectMessage(Object)

##### Declaration

    public IObjectMessage CreateObjectMessage(object body)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Object | body |

##### Returns

Type | Description
--- | ---
Apache.NMS.IObjectMessage |

| Improve this Doc View Source

#### CreateStreamMessage()

##### Declaration

    public IStreamMessage CreateStreamMessage()

##### Returns

Type | Description
--- | ---
Apache.NMS.IStreamMessage |

| Improve this Doc View Source

#### CreateTextMessage()

##### Declaration

    public ITextMessage CreateTextMessage()

##### Returns

Type | Description
--- | ---
Apache.NMS.ITextMessage |

| Improve this Doc View Source

#### CreateTextMessage(String)

##### Declaration

    public ITextMessage CreateTextMessage(string text)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | text |

##### Returns

Type | Description
--- | ---
Apache.NMS.ITextMessage |

| Improve this Doc View Source

#### Dispose()

##### Declaration

    public void Dispose()

| Improve this Doc View Source

#### Dispose(Boolean)

##### Declaration

    protected void Dispose(bool disposing)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Boolean | disposing |

| Improve this Doc View Source

#### Finalize()

##### Declaration

    protected void Finalize()

| Improve this Doc View Source

#### Send(IDestination, IMessage)

##### Declaration

    public void Send(IDestination destination, IMessage message)

##### Parameters

Type | Name | Description
--- | --- | ---
Apache.NMS.IDestination | destination |
Apache.NMS.IMessage | message |

| Improve this Doc View Source

#### Send(IDestination, IMessage, MsgDeliveryMode, MsgPriority, TimeSpan)

##### Declaration

    public void Send(IDestination destination, IMessage message, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive)

##### Parameters

Type | Name | Description
--- | --- | ---
Apache.NMS.IDestination | destination |
Apache.NMS.IMessage | message |
Apache.NMS.MsgDeliveryMode | deliveryMode |
Apache.NMS.MsgPriority | priority |
System.TimeSpan | timeToLive |

| Improve this Doc View Source

#### Send(IDestination, IMessage, MsgDeliveryMode, MsgPriority, TimeSpan, Boolean)

##### Declaration

    protected void Send(IDestination destination, IMessage message, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive, bool specifiedTimeToLive)

##### Parameters

Type | Name | Description
--- | --- | ---
Apache.NMS.IDestination | destination |
Apache.NMS.IMessage | message |
Apache.NMS.MsgDeliveryMode | deliveryMode |
Apache.NMS.MsgPriority | priority |
System.TimeSpan | timeToLive |
System.Boolean | specifiedTimeToLive |

| Improve this Doc View Source

#### Send(IMessage)

##### Declaration

    public void Send(IMessage message)

##### Parameters

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

| Improve this Doc View Source

#### Send(IMessage, MsgDeliveryMode, MsgPriority, TimeSpan)

##### Declaration

    public void Send(IMessage message, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive)

##### Parameters

Type | Name | Description
--- | --- | ---
Apache.NMS.IMessage | message |
Apache.NMS.MsgDeliveryMode | deliveryMode |
Apache.NMS.MsgPriority | priority |
System.TimeSpan | timeToLive |

### Implements

Apache.NMS.IMessageProducer
System.IDisposable