--- title: "Put Message" slug: "put-message" updated: 2025-08-20T14:52:28Z published: 2025-08-20T14:52:28Z canonical: "documentation.decisions.com/put-message" --- > ## Documentation Index > Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt > Use this file to discover all available pages before exploring further. # Put Message | Step Details | | --- | | **Introduced in Version** | 3.0.0 | | **Last Modified in Version** | 7.15.0 | | **Location** | Integration > MSMQ | The **Put Message** step is used to put a message inside a message queue. ### Prerequisites - This step requires the [MSMQ](https://documentation.decisions.com/docs/msmq) module to be [installed](https://documentation.decisions.com/docs/installing-modules-decisions) before it will be available in the toolbox. - A [dependency](https://documentation.decisions.com/docs/project-dependencies) must be created after installing the module in order for the the steps to be properly used. --- ## Properties #### Inputs | Property | Description | Data Type | | --- | --- | --- | | Message | Message to be placed into a queue. | String | | Path Queue | path to the designated queue to place message in. | String | ![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-08-20_10h21_05.png) --- ## Common Errors ### Length ('-1') must be a non-negative value. If the queue path provided does not exist and the MSMQ library cannot resolve the issue, the step will cause an error. To correct this, change the queue path in the step to be valid and appropriately formatted. #### Exception Message: ```csharp DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Put Message 1[PutMessage] in flow [Step Library Flow]: Exception invoking method PutMessage on class MSMQSteps ---> DecisionsFramework.LoggedException: Exception invoking method PutMessage on class MSMQSteps ---> DecisionsFramework.LoggedException: Failed to put a message by path: localhost/queue ---> System.ArgumentOutOfRangeException: length ('-1') must be a non-negative value. (Parameter 'length') Actual value was -1. at System.ArgumentOutOfRangeException.ThrowNegative[T](T value, String paramName) at System.ArgumentOutOfRangeException.ThrowIfNegative[T](T value, String paramName) at System.String.ThrowSubstringArgumentOutOfRange(Int32 startIndex, Int32 length) at System.String.Substring(Int32 startIndex, Int32 length) at Experimental.System.Messaging.MessageQueue.ResolveFormatNameFromQueuePath(String queuePath, Boolean throwException) at Experimental.System.Messaging.MessageQueue.get_FormatName() at Experimental.System.Messaging.MessageQueue.get_QueueInfoKey() at Experimental.System.Messaging.MessageQueue.get_MQInfo() at Experimental.System.Messaging.MessageQueue.StaleSafeSendMessage(MQPROPS properties, IntPtr transaction) at Experimental.System.Messaging.MessageQueue.SendInternal(Object obj, MessageQueueTransaction internalTransaction, MessageQueueTransactionType transactionType) at Experimental.System.Messaging.MessageQueue.Send(Object obj) at Decisions.Messaging.MSMQ.MSMQSteps.PutMessage(String pathQueue, String message) --- End of inner exception stack trace --- at Decisions.Messaging.MSMQ.MSMQSteps.PutMessage(String pathQueue, String message) at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr) --- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data) at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData) at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData) --- End of inner exception stack trace --- ``` --- Related Information Related Articles: [MSMQ Module](https://documentation.decisions.com/docs/msmq) [About Messaging](https://documentation.decisions.com/docs/about-messaging)