RigInboundGateway.ApiProxy.Handler.Kafka (Reactive Interaction Gateway v3.0.0-alpha.2) View Source
Handles requests for Kafka targets.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Returns module configuration.
Produce the request to a Kafka topic and optionally wait for the (correlated) response.
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Specs
config() :: any()
Returns module configuration.
If application environment contains values in Keyword
or Map
struct,
defaults from macro usage will be recursively merged with application configuration.
If one of the configuration parameters does not exist or can not be resolved, raises ArgumentError
.
do_handle_http_request(conn, request_path, partition, event, response_from, topic \\ nil, schema \\ nil)
View SourceProduce the request to a Kafka topic and optionally wait for the (correlated) response.
Expects a JSON encoded CloudEvent in the HTTP body.
Optionally set a partition key via this field:
rig
: {"target_partition":"the-partition-key"}
Specs
kafka_handler(Cloudevents.kafka_body(), Cloudevents.kafka_headers()) :: :ok | {:error, %{ :__exception__ => true, :__struct__ => atom(), optional(atom()) => any() }, any()}