rocketmq-client-go
rocketmq-client-go copied to clipboard
Modify producer api to increase flexibility
FEATURE REQUEST
RequestAsync has an argument callback which is an internal function type.
Maybes it's better to define an API function without importing an internal definition.
For example:
- When I tried to implement a mock producer to do unit testing of my business logic, it was almost impossible.
- When I tried to implement a wrapper producer which integrated some custom logic, it was also very hard to do.
you can try this
https://github.com/apache/rocketmq-client-go/blob/49f0448ef642f9cf9294e94a637fbeed4328a3f4/examples/producer/rpc/async/main.go#L52-L59