Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basic_publish should accept simple String / sub-string as message #63

Open
scls19fr opened this issue Oct 17, 2022 · 0 comments
Open

basic_publish should accept simple String / sub-string as message #63

scls19fr opened this issue Oct 17, 2022 · 0 comments

Comments

@scls19fr
Copy link
Contributor

scls19fr commented Oct 17, 2022

Hello,

Trying to convert https://www.rabbitmq.com/tutorials/tutorial-one-python.html to Julia (*), I noticed that API of this AMQPClient.jl could probably be improved to accept String / sub-string (ie without creating explicitly a Message)

For example the following Python code

channel.basic_publish(exchange='',
                      routing_key='hello',
                      body=data)

can be converted to Julia

# create a persistent plain text message
data = convert(Vector{UInt8}, codeunits("hello world"))
msg = Message(data, content_type="text/plain", delivery_mode=PERSISTENT)
basic_publish(chan1, msg; exchange="", routing_key="hello")

why not having simply?

basic_publish(chan1, "Hello World!"; exchange="", routing_key="hello")

Kind regards

(*) https://github.com/rabbitmq/rabbitmq-tutorials/tree/main/julia provides now such tutorial

@scls19fr scls19fr changed the title basic_publish should accept simple String / sub-string basic_publish should accept simple String / sub-string as message Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant