Skip to content

Commit

Permalink
Update default dlq producer name
Browse files Browse the repository at this point in the history
  • Loading branch information
geniusjoe committed Dec 20, 2024
1 parent a2525b0 commit b6c98aa
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 98 deletions.
66 changes: 33 additions & 33 deletions docs/concepts-messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ For batch messages, you can enable batch index acknowledgment to avoid dispatchi
Messages can be acknowledged in one of the following two ways:

- Being acknowledged individually

With individual acknowledgment, the consumer acknowledges each message and sends an acknowledgment request to the broker.

- Being acknowledged cumulatively

With cumulative acknowledgment, the consumer **only** acknowledges the last message it received. All messages in the stream up to (and including) the provided message are not redelivered to that consumer.

If you want to acknowledge messages individually, you can use the following API.
Expand Down Expand Up @@ -338,7 +338,7 @@ The default dead letter topic uses this format:
The dead letter producerName uses this format:

```
<topicname>-<subscriptionname>-<consumername>-DLQ
<topicname>-<subscriptionname>-<consumername>-<randomstring>-DLQ
```

:::note
Expand Down Expand Up @@ -515,7 +515,7 @@ A Pulsar subscription is a named configuration rule that determines how messages
- [exclusive](#exclusive)
- [shared](#shared)
- [failover](#failover)
- [key_shared](#key_shared)
- [key_shared](#key_shared)

These types are illustrated in the figure below.

Expand Down Expand Up @@ -551,9 +551,9 @@ Exclusive is the default subscription type.

#### Failover

The failover type is a subscription type that multiple consumers can attach to the same subscription.
The failover type is a subscription type that multiple consumers can attach to the same subscription.

A master consumer is picked for a non-partitioned topic or each partition of a partitioned topic and receives messages.
A master consumer is picked for a non-partitioned topic or each partition of a partitioned topic and receives messages.

When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line.

Expand All @@ -565,60 +565,60 @@ In some cases, a partition may have an older active consumer processing messages

##### Failover | Partitioned topics

For partitioned topics, the broker sorts consumers by priority and lexicographical order of consumer name.
For partitioned topics, the broker sorts consumers by priority and lexicographical order of consumer name.

The broker tries to evenly assign partitions to consumers with the highest priority.
The broker tries to evenly assign partitions to consumers with the highest priority.

A consumer is selected by running a module operation `mod (partition index, consumer index)`.

- If the number of partitions in a partitioned topic is **less** than the number of consumers:
For example, in the diagram below, this partitioned topic has 2 partitions and there are 4 consumers.
Each partition has 1 active consumer and 3 stand-by consumers.

For example, in the diagram below, this partitioned topic has 2 partitions and there are 4 consumers.

Each partition has 1 active consumer and 3 stand-by consumers.

- For P0, Consumer A is the master consumer, while Consumer B, Consumer C, and Consumer D would be the next consumer in line to receive messages if consumer A is disconnected.

- For P1, Consumer B is the master consumer, while Consumer A, Consumer C, and Consumer D would be the next consumer in line to receive messages if consumer B is disconnected.

- Moreover, if Consumer A and consumer B are disconnected, then
- Moreover, if Consumer A and consumer B are disconnected, then

- for P0: Consumer C is the active consumer and Consumer D is the stand-by consumer.

- for P1: Consumer D is the active consumer and Consumer C is the stand-by consumer.

![Workflow of failover subscription type in Pulsar](/assets/pulsar-failover-subscriptions-5.png)

- If the number of partitions in a partitioned topic is **greater** than the number of consumers:
For example, in the diagram below, this partitioned topic has 9 partitions and 3 consumers.

For example, in the diagram below, this partitioned topic has 9 partitions and 3 consumers.

- P0, P3, and P6 are assigned to Consumer A. Consumer A is their active consumer. Consumer B and Consumer C are their stand-by consumers.

- P1, P4, and P7 are assigned to Consumer B. Consumer B is their active consumer. Consumer A and Consumer C are their stand-by consumers.

- P2, P5, and P8 are assigned to Consumer C. Consumer C is their active consumer. Consumer A and Consumer B are their stand-by consumers.

![Workflow of failover subscription type in Pulsar](/assets/pulsar-failover-subscriptions-1.svg)

##### Failover | Non-partitioned topics

- If there is one non-partitioned topic. The broker picks consumers in the order they subscribe to non-partitioned topics.
- If there is one non-partitioned topic. The broker picks consumers in the order they subscribe to non-partitioned topics.

For example, in the diagram below, this non-partitioned topic has 1 topic and there are 2 consumers.

The topic has 1 active consumer and 1 stand-by consumer.

For example, in the diagram below, this non-partitioned topic has 1 topic and there are 2 consumers.

The topic has 1 active consumer and 1 stand-by consumer.

Consumer A is the master consumer, while consumer B would be the next consumer in line to receive messages if consumer A is disconnected.

![Workflow of failover subscription type in Pulsar](/assets/pulsar-failover-subscriptions-2.svg)

- If there are multiple non-partitioned topics, a consumer is selected based on **consumer name hash** and **topic name hash**. The client uses the same consumer name to subscribe to all the topics.

For example, in the diagram below, there are 4 non-partitioned topics and 2 consumers.
For example, in the diagram below, there are 4 non-partitioned topics and 2 consumers.

- The non-partitioned topic 1 and non-partitioned topic 4 are assigned to consumer B. Consumer A is their stand-by consumer.

- The non-partitioned topic 2 and non-partitioned topic 3 are assigned to consumer A. Consumer B is their stand-by consumer.

![Workflow of failover subscription type in Pulsar](/assets/pulsar-failover-subscriptions-3.svg)
Expand Down Expand Up @@ -647,7 +647,7 @@ The Key_Shared subscription type in Pulsar allows multiple consumers to attach t

If there is a newly switched over active consumer, it will start reading messages from the position where messages are acked by the old inactive consumer.

For example, if P0 is assigned to Consumer A. Consumer A is the active consumer and Consumer B is the stand-by consumer.
For example, if P0 is assigned to Consumer A. Consumer A is the active consumer and Consumer B is the stand-by consumer.

- If Consumer A gets disconnected without reading any messages from P0, when Consumer C is added and becomes the new active consumer, then Consumer C will start reading messages directly from P0.

Expand Down Expand Up @@ -858,7 +858,7 @@ The field `keyHashRanges` contained the information as a list of string values,
Example of the consumer stats part of the topic stats for a subscription:

```json
{
{
"consumers" : [ {
"msgRateOut" : 0.0,
"msgThroughputOut" : 0.0,
Expand Down Expand Up @@ -1193,7 +1193,7 @@ If there is a key attached to message, the messages will be routed to correspond

[Hashing Scheme](/api/client/org/apache/pulsar/client/api/HashingScheme) is an enum that represents sets of standard hashing functions available when choosing the partition to use for a particular message.

There are 2 types of standard hashing functions available:
There are 2 types of standard hashing functions available:

- JavaStringHash
- Murmur3_32Hash
Expand Down
64 changes: 32 additions & 32 deletions versioned_docs/version-3.3.x/concepts-messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ For batch messages, you can enable batch index acknowledgment to avoid dispatchi
Messages can be acknowledged in one of the following two ways:

- Being acknowledged individually

With individual acknowledgment, the consumer acknowledges each message and sends an acknowledgment request to the broker.

- Being acknowledged cumulatively

With cumulative acknowledgment, the consumer **only** acknowledges the last message it received. All messages in the stream up to (and including) the provided message are not redelivered to that consumer.

If you want to acknowledge messages individually, you can use the following API.
Expand Down Expand Up @@ -336,7 +336,7 @@ The default dead letter topic uses this format:
The dead letter producerName uses this format:

```
<topicname>-<subscriptionname>-<consumername>-DLQ
<topicname>-<subscriptionname>-<consumername>-<randomstring>-DLQ
```

:::note
Expand Down Expand Up @@ -513,7 +513,7 @@ A Pulsar subscription is a named configuration rule that determines how messages
- [exclusive](#exclusive)
- [shared](#shared)
- [failover](#failover)
- [key_shared](#key_shared)
- [key_shared](#key_shared)

These types are illustrated in the figure below.

Expand Down Expand Up @@ -549,9 +549,9 @@ Exclusive is the default subscription type.

#### Failover

The failover type is a subscription type that multiple consumers can attach to the same subscription.
The failover type is a subscription type that multiple consumers can attach to the same subscription.

A master consumer is picked for a non-partitioned topic or each partition of a partitioned topic and receives messages.
A master consumer is picked for a non-partitioned topic or each partition of a partitioned topic and receives messages.

When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line.

Expand All @@ -563,60 +563,60 @@ In some cases, a partition may have an older active consumer processing messages

##### Failover | Partitioned topics

For partitioned topics, the broker sorts consumers by priority and lexicographical order of consumer name.
For partitioned topics, the broker sorts consumers by priority and lexicographical order of consumer name.

The broker tries to evenly assign partitions to consumers with the highest priority.
The broker tries to evenly assign partitions to consumers with the highest priority.

A consumer is selected by running a module operation `mod (partition index, consumer index)`.

- If the number of partitions in a partitioned topic is **less** than the number of consumers:
For example, in the diagram below, this partitioned topic has 2 partitions and there are 4 consumers.
Each partition has 1 active consumer and 3 stand-by consumers.

For example, in the diagram below, this partitioned topic has 2 partitions and there are 4 consumers.

Each partition has 1 active consumer and 3 stand-by consumers.

- For P0, Consumer A is the master consumer, while Consumer B, Consumer C, and Consumer D would be the next consumer in line to receive messages if consumer A is disconnected.

- For P1, Consumer B is the master consumer, while Consumer A, Consumer C, and Consumer D would be the next consumer in line to receive messages if consumer B is disconnected.

- Moreover, if Consumer A and consumer B are disconnected, then
- Moreover, if Consumer A and consumer B are disconnected, then

- for P0: Consumer C is the active consumer and Consumer D is the stand-by consumer.

- for P1: Consumer D is the active consumer and Consumer C is the stand-by consumer.

![Workflow of failover subscription type in Pulsar](/assets/pulsar-failover-subscriptions-5.png)

- If the number of partitions in a partitioned topic is **greater** than the number of consumers:
For example, in the diagram below, this partitioned topic has 9 partitions and 3 consumers.

For example, in the diagram below, this partitioned topic has 9 partitions and 3 consumers.

- P0, P3, and P6 are assigned to Consumer A. Consumer A is their active consumer. Consumer B and Consumer C are their stand-by consumers.

- P1, P4, and P7 are assigned to Consumer B. Consumer B is their active consumer. Consumer A and Consumer C are their stand-by consumers.

- P2, P5, and P8 are assigned to Consumer C. Consumer C is their active consumer. Consumer A and Consumer B are their stand-by consumers.

![Workflow of failover subscription type in Pulsar](/assets/pulsar-failover-subscriptions-1.svg)

##### Failover | Non-partitioned topics

- If there is one non-partitioned topic. The broker picks consumers in the order they subscribe to non-partitioned topics.
- If there is one non-partitioned topic. The broker picks consumers in the order they subscribe to non-partitioned topics.

For example, in the diagram below, this non-partitioned topic has 1 topic and there are 2 consumers.

The topic has 1 active consumer and 1 stand-by consumer.

For example, in the diagram below, this non-partitioned topic has 1 topic and there are 2 consumers.

The topic has 1 active consumer and 1 stand-by consumer.

Consumer A is the master consumer, while consumer B would be the next consumer in line to receive messages if consumer A is disconnected.

![Workflow of failover subscription type in Pulsar](/assets/pulsar-failover-subscriptions-2.svg)

- If there are multiple non-partitioned topics, a consumer is selected based on **consumer name hash** and **topic name hash**. The client uses the same consumer name to subscribe to all the topics.

For example, in the diagram below, there are 4 non-partitioned topics and 2 consumers.
For example, in the diagram below, there are 4 non-partitioned topics and 2 consumers.

- The non-partitioned topic 1 and non-partitioned topic 4 are assigned to consumer A. Consumer B is their stand-by consumer.

- The non-partitioned topic 2 and non-partitioned topic 3 are assigned to consumer B. Consumer A is their stand-by consumer.

![Workflow of failover subscription type in Pulsar](/assets/pulsar-failover-subscriptions-3.svg)
Expand Down Expand Up @@ -645,7 +645,7 @@ The Key_Shared subscription type in Pulsar allows multiple consumers to attach t

If there is a newly switched over active consumer, it will start reading messages from the position where messages are acked by the old inactive consumer.

For example, if P0 is assigned to Consumer A. Consumer A is the active consumer and Consumer B is the stand-by consumer.
For example, if P0 is assigned to Consumer A. Consumer A is the active consumer and Consumer B is the stand-by consumer.

- If Consumer A gets disconnected without reading any messages from P0, when Consumer C is added and becomes the new active consumer, then Consumer C will start reading messages directly from P0.

Expand Down Expand Up @@ -1018,7 +1018,7 @@ If there is a key attached to message, the messages will be routed to correspond

[Hashing Scheme](/api/client/org/apache/pulsar/client/api/HashingScheme) is an enum that represents sets of standard hashing functions available when choosing the partition to use for a particular message.

There are 2 types of standard hashing functions available:
There are 2 types of standard hashing functions available:

- JavaStringHash
- Murmur3_32Hash
Expand Down
Loading

0 comments on commit b6c98aa

Please sign in to comment.