Skip to content

Commit

Permalink
Remove --amqp-send-settled
Browse files Browse the repository at this point in the history
It was introduced to allow fast publishing when there was no async publish.
SendWithRecepit doesn't allow sending settled messages, so let's just
remove this option altogether. If needed, we can add it back and use
Send() when it's used
  • Loading branch information
mkuratczyk committed Dec 9, 2024
1 parent 1648788 commit 513b5de
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
2 changes: 0 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ func RootCmd() *cobra.Command {
"AMQP application properties, eg. key1=val1,val2")
amqpPublisherFlags.StringSliceVar(&cfg.Amqp.Subjects, "amqp-subject", []string{},
"AMQP 1.0 message subject(s)")
amqpPublisherFlags.BoolVar(&cfg.Amqp.SendSettled, "amqp-send-settled", false,
"Send settled messages (fire and forget)")

amqpConsumerFlags := pflag.NewFlagSet("amqp-consumer", pflag.ContinueOnError)

Expand Down
6 changes: 0 additions & 6 deletions pkg/amqp10/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,8 @@ func (p *Amqp10Publisher) CreateSender() {
durability = amqp.DurabilityUnsettledState
}

settleMode := amqp.SenderSettleModeUnsettled.Ptr()
if p.Config.Amqp.SendSettled {
settleMode = amqp.SenderSettleModeSettled.Ptr()
}

for p.Sender == nil {
sender, err := p.Session.NewSender(context.TODO(), p.Terminus, &amqp.SenderOptions{
SettlementMode: settleMode,
TargetDurability: durability,
})
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ var QueueTypes = map[QueueType][]string{

type AmqpOptions struct {
Subjects []string
SendSettled bool
ReleaseRate int
RejectRate int
PropertyFilters map[string]string
Expand Down

0 comments on commit 513b5de

Please sign in to comment.