Comments (2)
I think using the -IncludeEnvelope parameter (with either method) will give you an object that includes the headers (including properties.reply_to and properties.reply_to_address) which should give you what you need to craft the response (using Send-RabbitMqMessage).
from psrabbitmq.
Thanks, that was the key.
For completeness, when somebody runs into the same problem, this is how I got it working:
$data = Wait-RabbitMqMessage -Exchange $ExchangeName -QueueName $QueueName -Key $QueueName `
-Timeout 120 -IncludeEnvelope @Params -ErrorAction SilentlyContinue
$return = @{
result = 'ok'
}
# do whatever you want with $data.payload, store your result in $return
Send-RabbitMqMessage -ReplyTo $data.properties.reply_to -Key $data.properties.reply_to -DeliveryMode 2 `
-CorrelationID $data.properties.correlation_id -ContentType 'application/json' `
@Params -InputObject $return
from psrabbitmq.
Related Issues (17)
- No connection created when using plaintext port 5672 HOT 6
- Allow Empty String for -Exchange HOT 3
- Some RabbitMQ calls dont support -vhost flag
- Possibility to reduce parameter definitions HOT 2
- Explicit Declaration of Exchange in Connect-RabbitMQChannel HOT 1
- Register-RabbitMQEvent not working when not setting Creds as Param HOT 1
- Question about a "retrieve loop" to drain a queue with multiple items in it. HOT 4
- Stored Message using PSRabbitMq has Powershell wrapper XML when reading HOT 2
- Wait-RabbitMqMessage drains queue with one run HOT 3
- Possible to connect to vhosts besides / ? HOT 2
- Send-RabbitMqMessage send allways the same body when pipeline is used HOT 1
- Not being able to specify a port other than the default ones (non-ssl and ssl). HOT 2
- Complementary Module HOT 1
- Define port on Start-RabbitMqListener
- Bind queue with multiple keys when connecting to a channel for topic exchange routing
- Wait-rabbitmqMessage Timeout question/issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from psrabbitmq.