Right now i’m falling back to the default nats way of handling consumer groups using queue groups
so my user-identity-server
emits an event consumer.identity.user.create
and my user-identity-consumer
implements the queue group in order to process the new user, this prevents 2 or 3 instances of the user-identity-consumer
from racing and causing anomalies.
however Im wondering if I can eliminate the user-identity-consumer and just instruct the user-identity-server to implement the queue group, if so how would I do that?
btw Im using the go-res sdk. I expect it looks something like this
func (uh *UserHandler) SetOption(rh *res.Handler) {
rh.Option(
res.Group("identity-user-workers"),
// Set call method handler, for creatong a user in vault.
res.Call("create", uh.set),
)
}
Or do I have the pupose of this wrong? if So how would I implement the work group?