Release v2.4.2-candidate-1
Update logic for picking active consumer for failover subscription on non-partitioned topic. (#4604)

Instead of sorting the consumers based on priority level and consumer name then pick a active consumer, which could cause subscription getting into a flaky state, where the "active" consumer joins and leaves, no consumer is actually elected as "active" and consuming the messages.
Fix logic to always pick the first consumer in the consumer list without sorting consumers. So consumers will be picked as acive consumer based on the order of their subscription.

(cherry picked from commit 22f1d7d1bea3a0f8746694be824081ed06ef9912)
4 files changed
tree: 38faef0a5047c29252de08bb6cb2918de2881f95
  1. .github/
  2. .test-infra/
  3. .travis/
  4. bin/
  5. build/
  6. buildtools/
  7. conf/
  8. dashboard/
  9. deployment/
  10. dev/
  11. distribution/
  12. docker/
  13. docker-compose/
  14. examples/
  15. jclouds-shaded/
  16. managed-ledger/
  17. managed-ledger-shaded/
  18. protobuf/
  19. protobuf-shaded/
  20. pulsar-broker/
  21. pulsar-broker-auth-athenz/
  22. pulsar-broker-auth-sasl/
  23. pulsar-broker-common/
  24. pulsar-broker-shaded/
  25. pulsar-client/
  26. pulsar-client-1x-base/
  27. pulsar-client-admin/
  28. pulsar-client-admin-shaded/
  29. pulsar-client-all/
  30. pulsar-client-api/
  31. pulsar-client-auth-athenz/
  32. pulsar-client-auth-sasl/
  33. pulsar-client-cpp/
  34. pulsar-client-go/
  35. pulsar-client-kafka-compat/
  36. pulsar-client-shaded/
  37. pulsar-client-tools/
  38. pulsar-client-tools-test/
  39. pulsar-common/
  40. pulsar-discovery-service/
  41. pulsar-flink/
  42. pulsar-function-go/
  43. pulsar-functions/
  44. pulsar-io/
  45. pulsar-log4j2-appender/
  46. pulsar-proxy/
  47. pulsar-spark/
  48. pulsar-sql/
  49. pulsar-storm/
  50. pulsar-testclient/
  51. pulsar-transaction/
  52. pulsar-websocket/
  53. pulsar-zookeeper/
  54. pulsar-zookeeper-utils/
  55. site/
  56. site2/
  57. src/
  58. tests/
  59. tiered-storage/
  60. .gitignore
  61. .travis.yml
  62. CONTRIBUTORS.md
  63. faq.md
  64. LICENSE
  65. NOTICE
  66. pom.xml
  67. README.md
README.md

logo

Pulsar is a distributed pub-sub messaging platform with a very flexible messaging model and an intuitive client API.

Learn more about Pulsar at https://pulsar.apache.org

Main features

  • Horizontally scalable (Millions of independent topics and millions of messages published per second)
  • Strong ordering and consistency guarantees
  • Low latency durable storage
  • Topic and queue semantics
  • Load balancer
  • Designed for being deployed as a hosted service:
    • Multi-tenant
    • Authentication
    • Authorization
    • Quotas
    • Support mixing very different workloads
    • Optional hardware isolation
  • Keeps track of consumer cursor position
  • REST API for provisioning, admin and stats
  • Geo replication
  • Transparent handling of partitioned topics
  • Transparent batching of messages

Build Pulsar

Requirements:

  • Java JDK 1.8
  • Maven

Compile and install:

$ mvn install -DskipTests

Run Unit Tests:

$ mvn test

Run Individual Unit Test:

cd related-module (e.g: pulsar-client)
$ mvn test -Dtest=unit-test-name (e.g: ConsumerBuilderImplTest)

Start standalone Pulsar service:

$ bin/pulsar standalone

Check https://pulsar.apache.org for documentation and examples.

Setting up your IDE

Apache Pulsar is using lombok so you have to ensure your IDE setup with required plugins.

Intellij

To configure annotation processing in IntelliJ:

  1. Open Annotation Processors Settings dialog box by going to Settings -> Build, Execution, Deployment -> Compiler -> Annotation Processors.

  2. Select the following buttons:

    1. “Enable annotation processing”
    2. “Obtain processors from project classpath”
    3. “Store generated sources relative to: Module content root”
  3. Set the generated source directories to be equal to the Maven directories:

    1. Set “Production sources directory:” to “target/generated-sources/annotations”.
    2. Set “Test sources directory:” to “target/generated-test-sources/test-annotations”.
  4. Click “OK”.

  5. Install the lombok plugin in intellij.

Eclipse

Follow the instructions here to configure your Eclipse setup.

Build Pulsar docs

Refer to the docs README.

Contact

Mailing lists
NameScope
users@pulsar.apache.orgUser-related discussionsSubscribeUnsubscribeArchives
dev@pulsar.apache.orgDevelopment-related discussionsSubscribeUnsubscribeArchives
Slack

Pulsar slack channel at https://apache-pulsar.slack.com/

You can self-register at https://apache-pulsar.herokuapp.com/

License

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

Crypto Notice

This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See http://www.wassenaar.org/ for more information.

The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this Apache Software Foundation distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.

The following provides more details on the included cryptographic software: Pulsar uses the SSL library from Bouncy Castle written by http://www.bouncycastle.org.