我们可以将每个应用的实例ID作为clientId赋值,这样出现问题可以很容易排查是来自哪台机器哪个进程导致的。 实例ID生成方法可以是IP:port(web应用)或者IP:hash(启动路径)
So it just should be used in a way that works best for your own use case.
Thanks Gerard !
On Tue, Apr 19, 2016 at 2:52 PM, Gerard Klijs <gerard.klijs@dizzit.com>
wrote:
> As far as I know the cientId is only used for logging, so you could set it
> to whatever is most usefull in the logging. You might for example want to
> use the ip as the id, so when you get errors you know where to look.
>
> On Tue, Apr 19, 2016 at 6:51 PM Rick Rineholt <cr22rc@gmail.com> wrote:
>
> > Hi,
> > If I have multiple consumers in a consumer group for load handling for
> the
> > same application is there any recommendation if the clientId should all
> be
> > unique for each? It's the same application. Each will have it's own
> > consumer memberId given on the join group so they can always be
> > distinguished by that.
> >
> > Thanks
> >
>