You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/12/26 13:30:57 UTC
[GitHub] [pulsar-client-go] dsmlily opened a new issue #147:
consumer.Receive () is blocking, availablePermits are decreasing,
but msgBacklog is increasing
dsmlily opened a new issue #147: consumer.Receive () is blocking, availablePermits are decreasing, but msgBacklog is increasing
URL: https://github.com/apache/pulsar-client-go/issues/147
#### Expected behavior
{
"msgRateIn" : 0.0,
"msgThroughputIn" : 0.0,
"msgRateOut" : 0.0,
"msgThroughputOut" : 0.0,
"averageMsgSize" : 0.0,
"storageSize" : 0,
"publishers" : [ ],
"subscriptions" : {
"response:proxy:8787:9:1577364969737" : {
"msgRateOut" : 0.0,
"msgThroughputOut" : 0.0,
"msgRateRedeliver" : 0.0,
"msgBacklog" : 0,
"blockedSubscriptionOnUnackedMsgs" : false,
"msgDelayed" : 0,
"unackedMessages" : 0,
"type" : "Failover",
"activeConsumerName" : "lxxlc",
"msgRateExpired" : 0.0,
"consumers" : [ {
"msgRateOut" : 0.0,
"msgThroughputOut" : 0.0,
"msgRateRedeliver" : 0.0,
"consumerName" : "lxxlc",
"availablePermits" : 1024,
"unackedMessages" : 0,
"blockedConsumerOnUnackedMsgs" : false,
"metadata" : { },
"connectedSince" : "2019-12-26T20:56:09.832+08:00",
"address" : "/10.32.68.213:57108"
} ],
"isReplicated" : false
}
},
"replication" : { },
"deduplicationStatus" : "Disabled"
}
{
"msgRateIn" : 0.0,
"msgThroughputIn" : 0.0,
"msgRateOut" : 0.0,
"msgThroughputOut" : 0.0,
"averageMsgSize" : 0.0,
"storageSize" : 2967,
"publishers" : [ {
"msgRateIn" : 0.0,
"msgThroughputIn" : 0.0,
"averageMsgSize" : 0.0,
"producerId" : 1,
"metadata" : { },
"producerName" : "qa-pulsar-ten-5-279",
"connectedSince" : "2019-12-26T20:56:40.736+08:00",
"address" : "/10.32.68.213:43156"
} ],
"subscriptions" : {
"response:proxy:8787:9:1577364969737" : {
"msgRateOut" : 0.0,
"msgThroughputOut" : 0.0,
"msgRateRedeliver" : 0.0,
"msgBacklog" : 1,
"blockedSubscriptionOnUnackedMsgs" : false,
"msgDelayed" : 0,
"unackedMessages" : 0,
"type" : "Failover",
"activeConsumerName" : "lxxlc",
"msgRateExpired" : 0.0,
"consumers" : [ {
"msgRateOut" : 0.0,
"msgThroughputOut" : 0.0,
"msgRateRedeliver" : 0.0,
"consumerName" : "lxxlc",
"availablePermits" : 1021,
"unackedMessages" : 0,
"blockedConsumerOnUnackedMsgs" : false,
"metadata" : { },
"connectedSince" : "2019-12-26T20:56:09.832+08:00",
"address" : "/10.32.68.213:57108"
} ],
"isReplicated" : false
}
},
"replication" : { },
"deduplicationStatus" : "Disabled"
}
{
"msgRateIn" : 0.0,
"msgThroughputIn" : 0.0,
"msgRateOut" : 0.0,
"msgThroughputOut" : 0.0,
"averageMsgSize" : 0.0,
"storageSize" : 5681,
"publishers" : [ {
"msgRateIn" : 0.0,
"msgThroughputIn" : 0.0,
"averageMsgSize" : 0.0,
"producerId" : 1,
"metadata" : { },
"producerName" : "qa-pulsar-ten-5-279",
"connectedSince" : "2019-12-26T20:56:40.736+08:00",
"address" : "/10.32.68.213:43156"
} ],
"subscriptions" : {
"response:proxy:8787:9:1577364969737" : {
"msgRateOut" : 0.0,
"msgThroughputOut" : 0.0,
"msgRateRedeliver" : 0.0,
"msgBacklog" : 3,
"blockedSubscriptionOnUnackedMsgs" : false,
"msgDelayed" : 0,
"unackedMessages" : 0,
"type" : "Failover",
"activeConsumerName" : "lxxlc",
"msgRateExpired" : 0.0,
"consumers" : [ {
"msgRateOut" : 0.0,
"msgThroughputOut" : 0.0,
"msgRateRedeliver" : 0.0,
"consumerName" : "lxxlc",
"availablePermits" : 1019,
"unackedMessages" : 0,
"blockedConsumerOnUnackedMsgs" : false,
"metadata" : { },
"connectedSince" : "2019-12-26T20:56:09.832+08:00",
"address" : "/10.32.68.213:57108"
} ],
"isReplicated" : false
}
},
"replication" : { },
"deduplicationStatus" : "Disabled"
}
{
"msgRateIn" : 0.0,
"msgThroughputIn" : 0.0,
"msgRateOut" : 0.0,
"msgThroughputOut" : 0.0,
"averageMsgSize" : 0.0,
"storageSize" : 7169,
"publishers" : [ {
"msgRateIn" : 0.0,
"msgThroughputIn" : 0.0,
"averageMsgSize" : 0.0,
"producerId" : 1,
"metadata" : { },
"producerName" : "qa-pulsar-ten-5-279",
"connectedSince" : "2019-12-26T20:56:40.736+08:00",
"address" : "/10.32.68.213:43156"
} ],
"subscriptions" : {
"response:proxy:8787:9:1577364969737" : {
"msgRateOut" : 0.0,
"msgThroughputOut" : 0.0,
"msgRateRedeliver" : 0.0,
"msgBacklog" : 5,
"blockedSubscriptionOnUnackedMsgs" : false,
"msgDelayed" : 0,
"unackedMessages" : 0,
"type" : "Failover",
"activeConsumerName" : "lxxlc",
"msgRateExpired" : 0.0,
"consumers" : [ {
"msgRateOut" : 0.0,
"msgThroughputOut" : 0.0,
"msgRateRedeliver" : 0.0,
"consumerName" : "lxxlc",
"availablePermits" : 1017,
"unackedMessages" : 0,
"blockedConsumerOnUnackedMsgs" : false,
"metadata" : { },
"connectedSince" : "2019-12-26T20:56:09.832+08:00",
"address" : "/10.32.68.213:57108"
} ],
"isReplicated" : false
}
},
"replication" : { },
"deduplicationStatus" : "Disabled"
}
{
"msgRateIn" : 0.0,
"msgThroughputIn" : 0.0,
"msgRateOut" : 0.0,
"msgThroughputOut" : 0.0,
"averageMsgSize" : 0.0,
"storageSize" : 8718,
"publishers" : [ {
"msgRateIn" : 0.0,
"msgThroughputIn" : 0.0,
"averageMsgSize" : 0.0,
"producerId" : 1,
"metadata" : { },
"producerName" : "qa-pulsar-ten-5-279",
"connectedSince" : "2019-12-26T20:56:40.736+08:00",
"address" : "/10.32.68.213:43156"
} ],
"subscriptions" : {
"response:proxy:8787:9:1577364969737" : {
"msgRateOut" : 0.0,
"msgThroughputOut" : 0.0,
"msgRateRedeliver" : 0.0,
"msgBacklog" : 8,
"blockedSubscriptionOnUnackedMsgs" : false,
"msgDelayed" : 0,
"unackedMessages" : 0,
"type" : "Failover",
"activeConsumerName" : "lxxlc",
"msgRateExpired" : 0.0,
"consumers" : [ {
"msgRateOut" : 0.0,
"msgThroughputOut" : 0.0,
"msgRateRedeliver" : 0.0,
"consumerName" : "lxxlc",
"availablePermits" : 1014,
"unackedMessages" : 0,
"blockedConsumerOnUnackedMsgs" : false,
"metadata" : { },
"connectedSince" : "2019-12-26T20:56:09.832+08:00",
"address" : "/10.32.68.213:57108"
} ],
"isReplicated" : false
}
},
"replication" : { },
"deduplicationStatus" : "Disabled"
}
{
"msgRateIn" : 0.0,
"msgThroughputIn" : 0.0,
"msgRateOut" : 0.0,
"msgThroughputOut" : 0.0,
"averageMsgSize" : 0.0,
"storageSize" : 6,
"publishers" : [ {
"msgRateIn" : 0.0,
"msgThroughputIn" : 0.0,
"averageMsgSize" : 0.0,
"producerId" : 1,
"metadata" : { },
"producerName" : "qa-pulsar-ten-5-279",
"connectedSince" : "2019-12-26T20:56:40.736+08:00",
"address" : "/10.32.68.213:43156"
} ],
"subscriptions" : {
"response:proxy:8787:9:1577364969737" : {
"msgRateOut" : 0.0,
"msgThroughputOut" : 0.0,
"msgRateRedeliver" : 0.0,
"msgBacklog" : 0,
"blockedSubscriptionOnUnackedMsgs" : false,
"msgDelayed" : 0,
"unackedMessages" : 0,
"type" : "Failover",
"activeConsumerName" : "lxxlc",
"msgRateExpired" : 0.0,
"consumers" : [ {
"msgRateOut" : 0.0,
"msgThroughputOut" : 0.0,
"msgRateRedeliver" : 0.0,
"consumerName" : "lxxlc",
"availablePermits" : 1011,
"unackedMessages" : 0,
"blockedConsumerOnUnackedMsgs" : false,
"metadata" : { },
"connectedSince" : "2019-12-26T20:56:09.832+08:00",
"address" : "/10.32.68.213:57108"
} ],
"isReplicated" : false
}
},
"replication" : { },
"deduplicationStatus" : "Disabled"
}
#### System configuration
**Pulsar version**: 2.4.0
**type** : Failover
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar-client-go] merlimat closed issue #147: consumer.Receive ()
is blocking, availablePermits are decreasing, but msgBacklog is increasing
Posted by GitBox <gi...@apache.org>.
merlimat closed issue #147: consumer.Receive () is blocking, availablePermits are decreasing, but msgBacklog is increasing
URL: https://github.com/apache/pulsar-client-go/issues/147
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar-client-go] merlimat commented on issue #147:
consumer.Receive () is blocking, availablePermits are decreasing,
but msgBacklog is increasing
Posted by GitBox <gi...@apache.org>.
merlimat commented on issue #147: consumer.Receive () is blocking, availablePermits are decreasing, but msgBacklog is increasing
URL: https://github.com/apache/pulsar-client-go/issues/147#issuecomment-570921760
@dsmlily The issue was fixed in #163 and merged in master now.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar-client-go] cckellogg commented on issue #147:
consumer.Receive () is blocking, availablePermits are decreasing,
but msgBacklog is increasing
Posted by GitBox <gi...@apache.org>.
cckellogg commented on issue #147: consumer.Receive () is blocking, availablePermits are decreasing, but msgBacklog is increasing
URL: https://github.com/apache/pulsar-client-go/issues/147#issuecomment-569533056
Just so I understand correctly the application starts to block at this line.
```
msg, err := headConsumer.Receive(ctx)
```
And the message backlog starts to increase and the number of available permits starts to decrease.
Do you ever receive messages any messages or does it initially block and no messages are ever received?
Do you have logs from the application that you can share before it starts to block?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar-client-go] dsmlily commented on issue #147:
consumer.Receive () is blocking, availablePermits are decreasing,
but msgBacklog is increasing
Posted by GitBox <gi...@apache.org>.
dsmlily commented on issue #147: consumer.Receive () is blocking, availablePermits are decreasing, but msgBacklog is increasing
URL: https://github.com/apache/pulsar-client-go/issues/147#issuecomment-569410538
> Can you provide some code and or steps to reproduce this? This will help in debugging it.
```
type ProxyConsumer struct {
consumer pulsar.Consumer
consumerMap map[string]chan<- string
mutex sync.RWMutex
}
func (pc *ProxyConsumer) Register(user string, ch chan<- string) error {
if pc.consumer == nil {
err := createGlobalConsumer()
if err != nil {
return err
}
}
pc.mutex.Lock()
//if _, ok := pc.consumerMap[user]; ok {
// pc.mutex.Unlock()
// return errors.New("already exist")
//}s
pc.consumerMap[user] = ch
pc.mutex.Unlock()
return nil
}
func (pc *ProxyConsumer) Unregister(user string, ch chan<- string) {
pc.mutex.Lock()
if obj, ok := pc.consumerMap[user]; ok {
if obj == ch {
delete(pc.consumerMap, user)
}
}
pc.mutex.Unlock()
}
func createGlobalConsumer() error {
if GProxyConsumer.consumer != nil {
return nil
}
responceTopic := ConfMgr.PRODUCT_ID + general.CONST_SLASH + ConfMgr.PULSAR_NAMESPACE+ general.CONST_SLASH + GSourceFlag
subscriptionName := ConfMgr.PULSAR_GLOBAL_SUBSCRIBE_NAME + general.CONST_COLON + GSourceFlag
var t = pulsar.KeyShared
switch ConfMgr.PULSAR_RESPONSE_SUBTYPE {
case subscribe_exclusive:
t = pulsar.Exclusive
case subscribe_failover:
t = pulsar.Failover
case subscribe_keyShared:
t = pulsar.KeyShared
case subscribe_shared:
t = pulsar.Shared
}
cfg := pulsar.ConsumerOptions{
Topic: responceTopic,
SubscriptionName: subscriptionName,
Type: t,
ReceiverQueueSize: ConfMgr.PULSAR_CONSUME_QUESIZE,
SubscriptionInitialPosition: pulsar.SubscriptionPositionLatest,
}
log.Info("createGlobalConsumer topic: %s subscriptionName:%s",responceTopic, subscriptionName)
headConsumer, err := GConsumerClient.Subscribe(cfg)
if err != nil {
log.Error("Could not establish subscription %v", err)
return err
}
fmt.Println(headConsumer)
GProxyConsumer.consumerMap = make(map[string]chan<- string)
GProxyConsumer.consumer = headConsumer
go func() {
for {
ctx := context.Background()
msg, err := headConsumer.Receive(ctx)
if err != nil {
log.Error("receive")
continue
}
log.Info("headConsumer.Receive: %s", string(msg.Payload()),general.LOG_TYPE,"responce")
//解析出userid
var mapMsg map[string]interface{}
json.Unmarshal(msg.Payload(), &mapMsg)
if err != nil {
log.Error("error")
headConsumer.Ack(msg)
continue
}
headConsumer.Ack(msg)
//log.Info("headConsumer.Receive:map %v", mapMsg)
roomId, ok := mapMsg["roomid"]
if !ok {
log.Error("headConsumer.Receive not roomid",general.LOG_TYPE,"responce")
continue
}
userId, ok := mapMsg["userid"]
if !ok {
log.Error("headConsumer.Receive not userid",general.LOG_TYPE,"responce")
continue
}
userkey := general.GenIdenKey(roomId.(string), userId.(string))
GProxyConsumer.mutex.RLock()
if ch, ok := GProxyConsumer.consumerMap[userkey]; ok && ch != nil {
log.Info("inchan to %s", userkey)
select {
case ch <- string(msg.Payload()):
default:
}
}
GProxyConsumer.mutex.RUnlock()
//headConsumer.Ack(msg)
}
}()
return nil
}
func initGlobalPulsarConsumer() {
//ctx := context.Background()
client, err := pulsar.NewClient(pulsar.ClientOptions{
URL: ConfMgr.PULSAR_ADDR,
ConnectionTimeout: time.Second * time.Duration(ConfMgr.PULSAR_CONNECT_TIMEOUT),
OperationTimeout: time.Second * time.Duration(ConfMgr.PULSAR_OPERATION_TIMEOUT),
})
if err != nil || client == nil {
log.Error("failed to connect pulsar")
return
}
GConsumerClient = client
createGlobalConsumer()
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar-client-go] dsmlily commented on issue #147:
consumer.Receive () is blocking, availablePermits are decreasing,
but msgBacklog is increasing
Posted by GitBox <gi...@apache.org>.
dsmlily commented on issue #147: consumer.Receive () is blocking, availablePermits are decreasing, but msgBacklog is increasing
URL: https://github.com/apache/pulsar-client-go/issues/147#issuecomment-569935873
20:55:23.398 [ForkJoinPool.commonPool-worker-4] INFO org.apache.pulsar.broker.service.ServerCnx - [/10.32.68.186:60483]-1 persistent://2/signal/10.32.68.228:
8787:19629:1577796819643 configured with schema false
20:55:23.398 [ForkJoinPool.commonPool-worker-4] INFO org.apache.pulsar.broker.service.ServerCnx - [/10.32.68.186:60483] Created new producer: Producer{topic=PersistentTopic{topic=persistent://2/signal/10.32.68.228:8787:19629:1577796819643}, client=/10.32.68.186:60483, producerName=qa-pulsar-ali-15-23, producerId=1}
20:55:23.402 [pulsar-io-22-3] INFO org.apache.pulsar.broker.service.ServerCnx - [/10.32.68.186:60483][persistent://2/signal_geo/test12311407] Creating producer. producerId=2
20:55:23.403 [ForkJoinPool.commonPool-worker-7] INFO org.apache.pulsar.broker.service.ServerCnx - [/10.32.68.186:60483]-2 persistent://2/signal_geo/test12311407 configured with schema false
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar-client-go] dsmlily commented on issue #147:
consumer.Receive () is blocking, availablePermits are decreasing,
but msgBacklog is increasing
Posted by GitBox <gi...@apache.org>.
dsmlily commented on issue #147: consumer.Receive () is blocking, availablePermits are decreasing, but msgBacklog is increasing
URL: https://github.com/apache/pulsar-client-go/issues/147#issuecomment-570050836
the consumer's logs are in the file "proxylog.txt"
[proxylog.txt](https://github.com/apache/pulsar-client-go/files/4014058/proxylog.txt)
the producer's logs are in the file "workerlog.txt"
[workerlog.txt](https://github.com/apache/pulsar-client-go/files/4014059/workerlog.txt)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar-client-go] dsmlily commented on issue #147:
consumer.Receive () is blocking, availablePermits are decreasing,
but msgBacklog is increasing
Posted by GitBox <gi...@apache.org>.
dsmlily commented on issue #147: consumer.Receive () is blocking, availablePermits are decreasing, but msgBacklog is increasing
URL: https://github.com/apache/pulsar-client-go/issues/147#issuecomment-569594028
@cckellogg I had received some messages before this happened.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar-client-go] dsmlily edited a comment on issue #147:
consumer.Receive () is blocking, availablePermits are decreasing,
but msgBacklog is increasing
Posted by GitBox <gi...@apache.org>.
dsmlily edited a comment on issue #147: consumer.Receive () is blocking, availablePermits are decreasing, but msgBacklog is increasing
URL: https://github.com/apache/pulsar-client-go/issues/147#issuecomment-569935873
broker logs:
20:55:23.398 [ForkJoinPool.commonPool-worker-4] INFO org.apache.pulsar.broker.service.ServerCnx - [/10.32.68.186:60483]-1
persistent://2/signal/10.32.68.228:
8787:19629:1577796819643 configured with schema false
20:55:23.398 [ForkJoinPool.commonPool-worker-4] INFO org.apache.pulsar.broker.service.ServerCnx - [/10.32.68.186:60483] Created new producer: Producer{topic=PersistentTopic{topic=persistent://2/signal/10.32.68.228:8787:19629:1577796819643}, client=/10.32.68.186:60483, producerName=qa-pulsar-ali-15-23, producerId=1}
20:55:23.402 [pulsar-io-22-3] INFO org.apache.pulsar.broker.service.ServerCnx - [/10.32.68.186:60483][persistent://2/signal_geo/test12311407] Creating producer. producerId=2
20:55:23.403 [ForkJoinPool.commonPool-worker-7] INFO org.apache.pulsar.broker.service.ServerCnx - [/10.32.68.186:60483]-2 persistent://2/signal_geo/test12311407 configured with schema false
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar-client-go] dsmlily commented on issue #147:
consumer.Receive () is blocking, availablePermits are decreasing,
but msgBacklog is increasing
Posted by GitBox <gi...@apache.org>.
dsmlily commented on issue #147: consumer.Receive () is blocking, availablePermits are decreasing, but msgBacklog is increasing
URL: https://github.com/apache/pulsar-client-go/issues/147#issuecomment-570903394
the version of the client is commit 5004b5d81001f7276091b11699cf568778d83556
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar-client-go] cckellogg commented on issue #147:
consumer.Receive () is blocking, availablePermits are decreasing,
but msgBacklog is increasing
Posted by GitBox <gi...@apache.org>.
cckellogg commented on issue #147: consumer.Receive () is blocking, availablePermits are decreasing, but msgBacklog is increasing
URL: https://github.com/apache/pulsar-client-go/issues/147#issuecomment-569351226
Can you provide some code and or steps to reproduce this? This will help in debugging it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar-client-go] cckellogg commented on issue #147:
consumer.Receive () is blocking, availablePermits are decreasing,
but msgBacklog is increasing
Posted by GitBox <gi...@apache.org>.
cckellogg commented on issue #147: consumer.Receive () is blocking, availablePermits are decreasing, but msgBacklog is increasing
URL: https://github.com/apache/pulsar-client-go/issues/147#issuecomment-570005506
Do you see any logs that start with this? `requesting more permits` or `unable to send permits`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar-client-go] dsmlily commented on issue #147:
consumer.Receive () is blocking, availablePermits are decreasing,
but msgBacklog is increasing
Posted by GitBox <gi...@apache.org>.
dsmlily commented on issue #147: consumer.Receive () is blocking, availablePermits are decreasing, but msgBacklog is increasing
URL: https://github.com/apache/pulsar-client-go/issues/147#issuecomment-569495227
@cckellogg I only uses the failover subscription, I will try others type. There is only one consumer for that failover subscription. 1024 is used for ConfMgr.PULSAR_CONSUME_QUESIZE.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar-client-go] dsmlily commented on issue #147:
consumer.Receive () is blocking, availablePermits are decreasing,
but msgBacklog is increasing
Posted by GitBox <gi...@apache.org>.
dsmlily commented on issue #147: consumer.Receive () is blocking, availablePermits are decreasing, but msgBacklog is increasing
URL: https://github.com/apache/pulsar-client-go/issues/147#issuecomment-570478120
today, I reproduce this, and find that the consumer reconnects broker every 90 seconds in blusar's logs, and the time is same as the connectedSince:
##### 1、broker's logs:
```
13:41:34.976 [pulsar-io-22-1] INFO org.apache.pulsar.broker.service.ServerCnx - New connection from /10.32.68.228:44686
13:42:35.081 [pulsar-io-22-3] INFO org.apache.pulsar.broker.service.ServerCnx - New connection from /10.32.68.228:44762
13:43:35.184 [pulsar-io-22-5] INFO org.apache.pulsar.broker.service.ServerCnx - New connection from /10.32.68.228:44842
13:45:05.299 [pulsar-io-22-7] INFO org.apache.pulsar.broker.service.ServerCnx - New connection from /10.32.68.228:44960
```
##### 2、topics stats:
```
{
"msgRateIn" : 0.0,
"msgThroughputIn" : 0.0,
"msgRateOut" : 2.6263857425095147,
"msgThroughputOut" : 2382.13186845613,
"averageMsgSize" : 0.0,
"storageSize" : 3173,
"publishers" : [ {
"msgRateIn" : 0.0,
"msgThroughputIn" : 0.0,
"averageMsgSize" : 0.0,
"producerId" : 8,
"metadata" : { },
"producerName" : "qa-pulsar-ali-27-0",
"connectedSince" : "2020-01-03T11:00:41.272+08:00",
"address" : "/10.32.32.223:52486"
} ],
"subscriptions" : {
"response:10.32.68.228:8787:28065:1578020423793" : {
"msgRateOut" : 2.6263857425095147,
"msgThroughputOut" : 2382.13186845613,
"msgRateRedeliver" : 0.0,
"msgBacklog" : 6,
"blockedSubscriptionOnUnackedMsgs" : false,
"msgDelayed" : 0,
"unackedMessages" : 0,
"type" : "Failover",
"activeConsumerName" : "hgijd",
"msgRateExpired" : 0.0,
"consumers" : [ {
"msgRateOut" : 2.6263857425095147,
"msgThroughputOut" : 2382.13186845613,
"msgRateRedeliver" : 0.0,
"consumerName" : "hgijd",
"availablePermits" : 1017,
"unackedMessages" : 0,
"blockedConsumerOnUnackedMsgs" : false,
"metadata" : { },
"connectedSince" : "2020-01-03T13:45:05.3+08:00",
"address" : "/10.32.68.228:44960"
} ],
"isReplicated" : false
}
},
"replication" : { },
"deduplicationStatus" : "Disabled"
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar-client-go] dsmlily commented on issue #147:
consumer.Receive () is blocking, availablePermits are decreasing,
but msgBacklog is increasing
Posted by GitBox <gi...@apache.org>.
dsmlily commented on issue #147: consumer.Receive () is blocking, availablePermits are decreasing, but msgBacklog is increasing
URL: https://github.com/apache/pulsar-client-go/issues/147#issuecomment-569940376
client logs:
![image](https://user-images.githubusercontent.com/8154781/71624911-ed982180-2c1f-11ea-87cd-b38f5c823268.png)
![image](https://user-images.githubusercontent.com/8154781/71624923-fab51080-2c1f-11ea-9bb6-c4071fa355f0.png)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar-client-go] cckellogg commented on issue #147:
consumer.Receive () is blocking, availablePermits are decreasing,
but msgBacklog is increasing
Posted by GitBox <gi...@apache.org>.
cckellogg commented on issue #147: consumer.Receive () is blocking, availablePermits are decreasing, but msgBacklog is increasing
URL: https://github.com/apache/pulsar-client-go/issues/147#issuecomment-569440203
Does this only happen for a failover subscription? Do you have multiple consumers for that failover subscription? What value are you using for ConfMgr.PULSAR_CONSUME_QUESIZE?
Can you try getting some client debug logs too?
I think you can this to turn on debugging.
log "github.com/sirupsen/logrus"
and then do something like this.
```
func init() {
log.SetLevel(log.DebugLevel)
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar-client-go] cckellogg commented on issue #147:
consumer.Receive () is blocking, availablePermits are decreasing,
but msgBacklog is increasing
Posted by GitBox <gi...@apache.org>.
cckellogg commented on issue #147: consumer.Receive () is blocking, availablePermits are decreasing, but msgBacklog is increasing
URL: https://github.com/apache/pulsar-client-go/issues/147#issuecomment-570726574
What version of the client are you using? There is PR up (https://github.com/apache/pulsar-client-go/pull/161) that fixes some connection issues that were recently introduced.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services