The time-to-reach-queue has elapsed

Posted by nieve on Stack Overflow See other posts from Stack Overflow or by nieve
Published on 2012-10-22T14:55:14Z Indexed on 2012/10/23 11:00 UTC
Read the original article Hit count: 165

Filed under:
|
|

I'm attempting to send a message to a remote private queue from an error queue with powershell. The code I use looks like this:

$msg = $src_q.Peek()
$msg.Label = GetLabelWithoutFailedQueue($msg)
$msg.UseDeadLetterQueue = $true
$msg.UseTracing = $true
$msg.AcknowledgeType = [System.Messaging.AcknowledgeTypes]::NegativeReceive
$msg.TimeToBeReceived = [System.TimeSpan]::FromSeconds(10)
$msg.TimeToReachQueue = [System.TimeSpan]::FromSeconds(10)
$tx = new-object System.Messaging.MessageQueueTransaction
$tx.Begin()
$dest_q.Send($msg, $tx)
$tx.Commit()

The message keeps on appearing on the transactional dead letter queue with the class: "The time-to-reach-queue has elapsed." Anyone's got any idea what could trigger such an error? The queue definitely exists- I do manage to peek it. Also, the reason I get the message from the error queue by peeking is just for testing purposes; I have tried doing the same thing with Receive and the result is the same.

© Stack Overflow or respective owner

Related posts about transactions

Related posts about msmq