-
Notifications
You must be signed in to change notification settings - Fork 314
Implemented messaging_servicebus
crate
#770
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
Conversation
Signed-off-by: Dan Chiarlone <dchiarlone@microsoft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this. Sorry, we moved the goal post. Instead of thiserror
, can you please use azure_core::error
. See #771.
@cataggar ~ Thank you for the review! Like I mentioned in an earlier comment, I was testing this project locally, and, while doing so, I realized none of the functions related to getting messages (i.e., Looking further into it, I realized that's because, rather than asking for a simple queue, we are sneakily asking for an event hub, which doesn't really have that sort of functionality as can be seen per our REST API reference:
Considering event hubs are built on top of service buses, the user could just pass in a queue name instead of an event hub name and that would work fine-ish, but I figured that's just bad UX for a crate called messaging_servicebus. I have an upcoming PR where I'm re-organizing things:
Also, per your request, I'll drop the Considering this was a lot of work, what are your thoughts on making this a |
Signed-off-by: Dan Chiarlone <dchiarlone@microsoft.com>
Another thing I'd like to point out is that, as soon as I push these latest changes, the tests from |
Signed-off-by: Dan Chiarlone <dchiarlone@microsoft.com>
Signed-off-by: Dan Chiarlone <dchiarlone@microsoft.com>
Signed-off-by: Dan Chiarlone <dchiarlone@microsoft.com>
Signed-off-by: Dan Chiarlone <dchiarlone@microsoft.com>
Signed-off-by: Dan Chiarlone <dchiarlone@microsoft.com>
Signed-off-by: Dan Chiarlone <dchiarlone@microsoft.com>
Signed-off-by: Dan Chiarlone <dchiarlone@microsoft.com>
Signed-off-by: Dan Chiarlone <dchiarlone@microsoft.com>
Signed-off-by: Dan Chiarlone <dchiarlone@microsoft.com>
Signed-off-by: Dan Chiarlone <dchiarlone@microsoft.com>
Signed-off-by: Dan Chiarlone <dchiarlone@microsoft.com>
Ok(url) | ||
} | ||
|
||
pub fn body_bytes_to_utf8(bytes: &[u8]) -> Result<String, Error> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked at this library enough to know if a conversion to a String
for a body is the right thing or if it should be passed around as Bytes
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I followed what the crate initially did there. Plus, as a user of the crate, I'd want String
rather than having to add a dependency for Bytes
and handle that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are okay with returning Bytes
. A recent similar change I made is here. I'm not going to hold up this PR for this.
Signed-off-by: Dan Chiarlone <dchiarlone@microsoft.com>
Ok(url) | ||
} | ||
|
||
pub fn body_bytes_to_utf8(bytes: &[u8]) -> Result<String, Error> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are okay with returning Bytes
. A recent similar change I made is here. I'm not going to hold up this PR for this.
// Please note they will be sent out of order!", | ||
// messages | ||
// ); | ||
client |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be great to have
- multi-thread example using rust channels, where one thread sends msg to the queue, and another thread recieves the msg from the queue.
- multi sender-receiver where one sender sends msg to multiple queues, and mutiple recivers are able to subscribe to different queues.
what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, I don't know if we should block the PR on examples.
Also, I should note: the Azure Service Bus API does not include the concept of "subscribing".
Signed-off-by: Dan Chiarlone <dchiarlone@microsoft.com>
This PR is addressing and hoping to close issue #255 — That is, I've updated the crate to use the new Azure core's
HttpClient
, as requested. Plus, coming from MindFlavor's AzureSDKForRust, I had to make some changes to error handling, so I did that too following the pattern used by other crates under sdk/.Signed-off-by: Dan Chiarlone dchiarlone@microsoft.com