Skip to content

Commit

Permalink
Remove stale suggested changes for a Broadway pipeline from the docs (#…
Browse files Browse the repository at this point in the history
…175)

* support for missing repo config

* remove unnecessary transform for broadway pipeline from docs
  • Loading branch information
maxmarcon authored Oct 19, 2022
1 parent f4c6b68 commit 7a4dd91
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions lib/prom_ex/plugins/broadway.ex
Original file line number Diff line number Diff line change
Expand Up @@ -30,44 +30,6 @@ if Code.ensure_loaded?(Broadway) do
end
end
```
## GenStage Producer
To correctly capture per-message metrics and error rate, add the following transform to your pipeline:
```
defmodule WebApp.MyPipeline do
use Broadway
alias Broadway.Message
def start_link(_opts) do
Broadway.start_link(__MODULE__,
name: __MODULE__,
producer: [
...
transformer: {__MODULE__, :transform, []}
]
)
end
def transform(event, _opts) do
%Message{
data: event,
acknowledger: {__MODULE__, :ack_id, :ack_data}
}
end
def ack(:ack_id, _successful_messages, _failed_messages) do
:ok
end
end
```
## BroadwayRabbitMQ.Producer
There's no need to configure an acknowledger on messages when using BroadwayRabbitMQ.
`BroadwayRabbitMQ.Producer` handles acking messages internally, which involves a unique `:delivery_tag` and `AMQP`.
"""

use PromEx.Plugin
Expand Down

0 comments on commit 7a4dd91

Please sign in to comment.