forked from SolaceLabs/solace-ai-connector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Alireza/ai 278/add forever broker reconnection config (#77)
* feat: add the forever retry * feat: keep connecting * feat: replace the reconnection * ref: moved settings to a new yaml file * feat: update documents * ref: move common settings to base broker * feat: generate documents * fix: retrieve litellm config
- Loading branch information
Showing
8 changed files
with
298 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Example for the broker inputs and outputs | ||
# | ||
# It will subscribe to `demo/messages` and expect an event with the payload: | ||
# | ||
# The input message has the following schema: | ||
# { | ||
# "content": "<some text>", | ||
# } | ||
# | ||
# It will then send an event back to Solace with the topic: `demo/messages/output` | ||
# | ||
# | ||
# required ENV variables: | ||
# - SOLACE_BROKER_URL | ||
# - SOLACE_BROKER_USERNAME | ||
# - SOLACE_BROKER_PASSWORD | ||
# - SOLACE_BROKER_VPN | ||
|
||
--- | ||
log: | ||
stdout_log_level: INFO | ||
log_file_level: INFO | ||
log_file: solace_ai_connector.log | ||
|
||
shared_config: | ||
- broker_config: &broker_connection | ||
broker_type: solace | ||
broker_url: ${SOLACE_BROKER_URL} | ||
broker_username: ${SOLACE_BROKER_USERNAME} | ||
broker_password: ${SOLACE_BROKER_PASSWORD} | ||
broker_vpn: ${SOLACE_BROKER_VPN} | ||
reconnection_strategy: forever_retry # options: forever_retry, parametrized_retry | ||
retry_interval: 1000 # in milliseconds | ||
|
||
|
||
flows: | ||
- name: Simple input flow | ||
components: | ||
# Input from a Solace broker | ||
- component_name: solace_input | ||
component_module: broker_input | ||
component_config: | ||
<<: *broker_connection | ||
broker_subscriptions: | ||
- topic: demo/messages | ||
payload_encoding: utf-8 | ||
payload_format: json | ||
|
||
# Send messages back to broker | ||
- component_name: solace_output | ||
component_module: broker_output | ||
component_config: | ||
<<: *broker_connection | ||
payload_encoding: utf-8 | ||
payload_format: json | ||
copy_user_properties: true | ||
input_transforms: | ||
- type: copy | ||
source_expression: previous:payload | ||
dest_expression: user_data.output:payload | ||
- type: copy | ||
source_expression: template:{{text://input.topic}}/output | ||
dest_expression: user_data.output:topic | ||
input_selection: | ||
source_expression: user_data.output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.