Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Commit

Permalink
Check for zero-uuid to determine dlq for dlq
Browse files Browse the repository at this point in the history
  • Loading branch information
kiranrg committed Sep 28, 2017
1 parent 8f826a7 commit 6944ca3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ const (
// InputHostForRemoteExtent is a special (and fake) input host ID for remote extent
InputHostForRemoteExtent = "88888888-8888-8888-8888-888888888888"

// ZeroUUID defines a UUID that is all zeroes
ZeroUUID = "00000000-0000-0000-0000-000000000000"

// KafkaPhantomExtentInputhost is placeholder/phantom inputhost uuid used for Kafka extents
KafkaPhantomExtentInputhost = "00000000-0000-0000-0000-000000000000"

Expand Down
3 changes: 2 additions & 1 deletion services/outputhost/deadletterqueue.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ func newDeadLetterQueue(ctx thrift.Context, lclLg bark.Logger, cgDesc shared.Con
go dlq.publish()

// If no DLQ is configured, note that and return success; It would normally not be configured for the consumer groups of a DLQ destination
if len(cgDesc.GetDeadLetterQueueDestinationUUID()) == 0 {
if len(cgDesc.GetDeadLetterQueueDestinationUUID()) == 0 ||
cgDesc.GetDeadLetterQueueDestinationUUID() == common.ZeroUUID {
lclLg.Info("No DLQ destination configured")
return
}
Expand Down

0 comments on commit 6944ca3

Please sign in to comment.