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

v5 event package #2728

Open
hunyadvari-peter opened this issue Aug 9, 2024 · 7 comments
Open

v5 event package #2728

hunyadvari-peter opened this issue Aug 9, 2024 · 7 comments

Comments

@hunyadvari-peter
Copy link

The event package has been deleted in v5 branch.
Is there any plan to do this?
How can we replace the event handling?
Brokers have much less functionality, and in theory no guarantee of delivery.

@asim
Copy link
Member

asim commented Aug 9, 2024

I think the two interfaces had a lot of overlapping concerns. So we could add some of that to the broker. Can you detail what parts you'd like to include?

@hunyadvari-peter
Copy link
Author

hunyadvari-peter commented Aug 9, 2024

I agree with you, but the two interfaces had different purposes. Broker = pub/sub, event = event streaming with multiple policies.
Options what is missing from broker:
AckWait time.Duration
RetryLimit int
AutoAck bool
CustomRetries bool
...

From message the Ack,Nack functions.

And the most important think is to handle topic filtering, with the broker is not possible.
Eg.: unable to subscribe to topic.*

@asim
Copy link
Member

asim commented Aug 9, 2024

What's your ideal solution? Reintroduce the event interface?

@asim
Copy link
Member

asim commented Aug 10, 2024

If you need it. You can make a PR to bring it back.

@vtolstov
Copy link
Contributor

Broker can do all the things, auto ack is simple if defer func() {
if err == nil {
return evt.Ack()
}
or can be handled in broker implementation. Topic filtering not the problem - in kafka for example you can subscribe via regexp to topics

@hunyadvari-peter
Copy link
Author

hunyadvari-peter commented Aug 12, 2024

Topic filtering not the problem - in kafka for example you can subscribe via regexp to topics

We will bring a solution in PR

autoack

It is not a good solution in some situation.

Topic filtering not the problem - in kafka for example you can subscribe via regexp to topics

I do not know nothing about kafka, but a lot of event broker use a * and similar character for filtering in a topic name. But rpc_server and the router try to find subscriber with the topic name he got from the broker, which is the full topic name, not the filtered. eg.:
we subscribe to this: topic.customer_*
we got event from this topic: topic.customer_micro

But we will bring a solution for this "problem" too, in PR.

@vtolstov
Copy link
Contributor

ah =) in my fork i'm remove ability to subscribe via server package and use broker directly, with ability to unmarshal to needed struct pointer

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

3 participants