# How to set replyTo header with OutboundMessageBuilder

**URL:** <https://community.solace.com/t/how-to-set-replyto-header-with-outboundmessagebuilder/1165>\
**Category:** General Discussions\
**Created:** [February 24, 2022, 2:20pm UTC](https://community.solace.com/t/how-to-set-replyto-header-with-outboundmessagebuilder/1165 "2022-02-24T14:20:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![radekm](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/radekm/32/901_2.png) [@radekm](https://community.solace.com/u/radekm)\
**Post date:** [February 24, 2022, 2:20pm UTC](https://community.solace.com/t/how-to-set-replyto-header-with-outboundmessagebuilder/1165/1 "2022-02-24T14:20:49Z")

</div>

Hi,  
we’re trying to use Python and new Java APIs but are we struggling to set replyTo header on outgoing messages.  
In old Java API you can just call BytesMessage.setReplyTo . Is there a way to do it in Python and new Java APIs with OutboundMessageBuilder ?  
Thanks

---

<div class="post-metadata">

**Author:** ![Tamimi](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/tamimi/32/2190_2.png) [@Tamimi](https://community.solace.com/u/Tamimi)\
**Post date:** [February 25, 2022, 4:51pm UTC](https://community.solace.com/t/how-to-set-replyto-header-with-outboundmessagebuilder/1165/2 "2022-02-25T16:51:21Z")

</div>

Hey @radekm ! You can use the RequestReply message builder in the Python (and new Java) API to create a request-reply message requester/replier. Is this something that you can make use of? We have sample code for the request-reply pattern coming soon in the samples repo, but I put a snippet on this post here [Solace Python API for request/reply architecture — Solace Community](https://community.solace.com/discussion/1221/solace-python-api-for-request-reply-architecture) if you want to get started. Let me know what your use-case is and I can hopefully shed more light on this !

---

<div class="post-metadata">

**Author:** ![radekm](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/radekm/32/901_2.png) [@radekm](https://community.solace.com/u/radekm)\
**Post date:** [March 10, 2022, 2:58pm UTC](https://community.solace.com/t/how-to-set-replyto-header-with-outboundmessagebuilder/1165/3 "2022-03-10T14:58:03Z")

</div>

Hi @Tamimi  
Thanks for the answer. I looked at the snipped for requestor but still don’t see how to set replyTo topic. It seems the example sets only request\_destination \>  
from solace.messaging.publisher.request\_reply\_message\_publisher import RequestReplyMessagePublisher

> # Create a direct message requestor and register the error handler
> 
> direct\_requestor: RequestReplyMessagePublisher = messaging\_service.request\_reply()   
> .create\_request\_reply\_message\_publisher\_builder()   
> .build()  
> direct\_requestor.start()  
> outbound\_msg = messaging\_service.message\_builder().build(f’\n{insert\_your\_message\_here}')  
> response = direct\_requestor\_blocking.publish\_await\_response(request\_message=outbound\_msg,   
> request\_destination=destination\_topic,   
> reply\_timeout=10000)  
> Unfortunately our system expects that replies are send to {replier-service-name}/to/{requestor-service-name}/{subject} so we can easily filter all replies by source or destination service or by subject
