nats-io/nats.ex

Make inbox optional

lubien opened this issue · 2 comments

Hi there!

I've been using a fork of your library on Fly.io for logs for a while but I had to make a few changes.

My proposal here would be to make inbox optional defaulting to true (the current behavior). I've already had this implemented here: 162cd94

If it's something you'd like I could make a pull request and add tests if needed

Hi @lubien I'm glad that the library has been useful! Can you provide a bit more context about why skipping the inbox is useful for the work you're doing? My thought was that creating an inbox is relatively cheap (you could have hundred or thousands of clients each with their own inbox without any noticeable load) and it will only be used if the client decides to do a request/reply.

Are you seeing performance problems with having the client create an inbox even if you don't intend to use it?

Rather than performance, our use case doesn't really needs it and doesn't support those. We just use NATs for one way messages passing the logs so for us having this inbox broke the usage of this lib so we ended up forking and making this optional.