kubemq-io / kubemq-Java

Java client library for KubeMQ server
https://kubemq.io
MIT License
27 stars 10 forks source link

How to use the Wildcards feature? #14

Closed terry8yu closed 1 year ago

terry8yu commented 1 year ago

When I use the code below to subscribe the events, it reported the error: SubscribeRequest subscribeRequest = new SubscribeRequest(); subscribeRequest.setChannel("mqtt.>"); subscribeRequest.setClientID("location-event"); subscribeRequest.setSubscribeType(SubscribeType.EventsStore); subscribeRequest.setEventsStoreType(EventsStoreType.StartAtSequence); try { subscriber.SubscribeToEvents(subscribeRequest, this); log.info("[EventListener::init] Subscribe to events-store [channel name : {}] successfully.", subscribeRequest.getChannel()); } catch (ServerAddressNotSuppliedException | SSLException e) { log.error("[EventListener::init] Failed to subscribe to events-store : ", e.getMessage()); e.printStackTrace(); } After the subscriber.SubscribeToEvents, the onError reported: io.grpc.StatusRuntimeException: INTERNAL: Error 107: invalid channel value, no wildcards are allowed. Does it support the Wildcards feature, or otherwise? Thx! BTW: I use this SDK: io.kubemq.sdk:kubemq-sdk-Java:1.0.4.

kubemq commented 1 year ago

You cannot use * in Events-Store only on Events, You can use our slack channel to ask questions

terry8yu commented 1 year ago

So you mean that Events-Store does not support *, does it support >? Can I use > on Events?

kubemq commented 1 year ago

only on Events no wildcards from any type is allowed on Events-Store

terry8yu commented 1 year ago

Got it, Thx!