kubemq-io / kubemq-go

go library for kubemq server
Apache License 2.0
47 stars 16 forks source link

Please, allow to create QueuesClient from Client directly #14

Closed CMDMichalKoval closed 1 year ago

CMDMichalKoval commented 1 year ago

Hi, i wanna use Ping() before using QueuesStream which is not available in QueuesClient. Can you please add method bellow or Ping() on QueuesClient? At current state, i'm not allowed to create QueuesClient outside of package.

// NewQueuesClient - create a new QueuesClient from client directly
func (c *Client) NewQueuesClient() *QueuesClient {
    return &QueuesClient{client: c}
}

Thanks.

kubemq commented 1 year ago

My assumption is you want to use the Ping to check connectivity to KubeMQ. No need to do so. The reason that there is no ping is because the queue stream is grpc stream, which means that if there is no connection or dropping connection you will get an error message. Did we make the wrong assumption ? Lior,

On Mon, Nov 14, 2022 at 11:47 AM CMDMichalKoval @.***> wrote:

Hi, i wanna use Ping() before using QueuesStream which is not available in QueuesClient. Can you please add method bellow or Ping() on QueuesClient? At current state, i'm not allowed to create QueuesClient outside of package.

// NewQueuesClient - create a new QueuesClient from client directlyfunc (c Client) NewQueuesClient() QueuesClient { return &QueuesClient{client: c} }

Thanks.

— Reply to this email directly, view it on GitHub https://github.com/kubemq-io/kubemq-go/issues/14, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK5WGXFLEMSQDXBN5ZPADZ3WIIDEXANCNFSM6AAAAAAR7TYFJA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

CMDMichalKoval commented 1 year ago

Our reason for pinging broker before running app, is to test connection if really works as should. If not, we not able run an application. If this case is already handled by KubeMQ itself so it's not required.