You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "cbrendanprice (via GitHub)" <gi...@apache.org> on 2023/06/24 14:42:48 UTC
[GitHub] [pulsar] cbrendanprice opened a new issue, #20637: [Bug] failover topics behaving like shared tpics when running apachepulsar/pulsar:3.0.0 standalone (only tested via python client)
cbrendanprice opened a new issue, #20637:
URL: https://github.com/apache/pulsar/issues/20637
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Version
apachepulsar/pulsar:3.0.0
### Minimal reproduce step
run docker with `pulsar standalone` command and use a python client to create two separate consumers configured with a consumer type of failover.
### What did you expect to see?
messages should only be consumed by one of the two created consumers.
### What did you see instead?
both consumers receive messages.
### Anything else?
i downgraded to apachepulsar/pulsar:2.11.1 and things worked correctly (with no change to client version or source code).
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] RobertIndie commented on issue #20637: [Bug] failover topics behaving like shared topics when running apachepulsar/pulsar:3.0.0 standalone (only tested via python client)
Posted by "RobertIndie (via GitHub)" <gi...@apache.org>.
RobertIndie commented on issue #20637:
URL: https://github.com/apache/pulsar/issues/20637#issuecomment-1630271484
I can't reproduce it.
Could you provide your reproducible code?
Here is my code:
```python
def test_failover(self):
def listener(consumer, msg):
print("Got message: %s" % msg.value())
consumer.acknowledge(msg)
client = Client(self.serviceUrl)
topic = 'test_failover'
producer = client.create_producer(topic)
consumer1 = client.subscribe(topic, 'my-sub', consumer_type=ConsumerType.Failover, message_listener=listener)
consumer2 = client.subscribe(topic, 'my-sub', consumer_type=ConsumerType.Failover, message_listener=listener)
msg_id = producer.send('hello'.encode())
producer.flush()
time.sleep(5)
client.close()
```
But it works fine. Only 1 consumer can consume the message:
```
2023-07-11 07:08:44.268 INFO [140120877363648] ClientConnection:184 | [<none> -> pulsar://localhost:6650] Create ClientConnection, timeout=10000
2023-07-11 07:08:44.268 INFO [140120877363648] ConnectionPool:106 | Created connection for pulsar://localhost:6650
2023-07-11 07:08:44.270 INFO [140120822662720] ClientConnection:382 | [127.0.0.1:42962 -> 127.0.0.1:6650] Connected to broker
2023-07-11 07:08:44.272 INFO [140120822662720] HandlerBase:72 | [persistent://public/default/test_failover, ] Getting connection from pool
2023-07-11 07:08:44.274 INFO [140120822662720] ProducerImpl:208 | [persistent://public/default/test_failover, ] Created producer on broker [127.0.0.1:42962 -> 127.0.0.1:6650]
2023-07-11 07:08:44.275 INFO [140120877363648] Client:90 | Subscribing on Topic :test_failover
2023-07-11 07:08:44.276 INFO [140120822662720] HandlerBase:72 | [0x560d43cba760, my-sub, 0] Getting connection from pool
2023-07-11 07:08:44.278 INFO [140120822662720] ConsumerImpl:282 | [0x560d43cba760, my-sub, 0] Created consumer on broker [127.0.0.1:42962 -> 127.0.0.1:6650]
2023-07-11 07:08:44.278 INFO [140120877363648] Client:90 | Subscribing on Topic :test_failover
2023-07-11 07:08:44.279 INFO [140120822662720] HandlerBase:72 | [0x7f7064005720, my-sub, 1] Getting connection from pool
2023-07-11 07:08:44.282 INFO [140120822662720] ConsumerImpl:282 | [0x7f7064005720, my-sub, 1] Created consumer on broker [127.0.0.1:42962 -> 127.0.0.1:6650]
Got message: b'hello'
2023-07-11 07:08:49.288 INFO [140120877363648] ClientImpl:599 | Closing Pulsar client with 1 producers and 2 consumers
2023-07-11 07:08:49.288 INFO [140120877363648] ProducerImpl:755 | [persistent://public/default/test_failover, standalone-0-1] Closing producer for topic 0x7f7064002e40
2023-07-11 07:08:49.288 INFO [140120877363648] ConsumerImpl:1229 | [0x7f7064005720, my-sub, 1] Closing consumer for topic 0x7f7064005720
2023-07-11 07:08:49.289 INFO [140120877363648] ConsumerImpl:1229 | [0x560d43cba760, my-sub, 0] Closing consumer for topic 0x560d43cba760
2023-07-11 07:08:49.290 INFO [140120822662720] ProducerImpl:719 | [persistent://public/default/test_failover, standalone-0-1] Closed producer 0
2023-07-11 07:08:49.290 INFO [140120822662720] ConsumerImpl:1215 | [0x7f7064005720, my-sub, 1] Closed consumer 1
2023-07-11 07:08:49.291 INFO [140120822662720] ConsumerImpl:1215 | [0x560d43cba760, my-sub, 0] Closed consumer 0
2023-07-11 07:08:49.291 INFO [140120797484608] ClientConnection:1229 | [127.0.0.1:42962 -> 127.0.0.1:6650] Connection disconnected
2023-07-11 07:08:49.291 INFO [140120797484608] ClientConnection:263 | [127.0.0.1:42962 -> 127.0.0.1:6650] Destroyed connection
2023-07-11 07:08:49.291 INFO [140120877363648] ProducerImpl:712 | Producer - [persistent://public/default/test_failover, standalone-0-1] , [batching = off]
.
----------------------------------------------------------------------
Ran 1 test in 5.024s
OK
```
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] github-actions[bot] commented on issue #20637: [Bug] failover topics behaving like shared topics when running apachepulsar/pulsar:3.0.0 standalone (only tested via python client)
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #20637:
URL: https://github.com/apache/pulsar/issues/20637#issuecomment-1674123863
The issue had no activity for 30 days, mark with Stale label.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] Technoboy- commented on issue #20637: [Bug] failover topics behaving like shared topics when running apachepulsar/pulsar:3.0.0 standalone (only tested via python client)
Posted by "Technoboy- (via GitHub)" <gi...@apache.org>.
Technoboy- commented on issue #20637:
URL: https://github.com/apache/pulsar/issues/20637#issuecomment-1610841983
@RobertIndie
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org