-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AI-170: Add new broker type: dev_broker #51
Conversation
Please mark whether you used Copilot to assist coding in this PR
|
SonarQube Quality Gate |
Do we need to add the Broker type: solace to all example yaml files? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
No. That config already existed and defaults to solace. With that said, if you want to be able to switch between the two, you do need this. I have a separate PR in cognitive-mesh and ai-eda-solace-chat that adds |
* feat: AI-170: websocket input and output components (start) * Refactor HttpServerInputBase to work as a websocket input component * refactor: implement WebSocket input component using Flask-SocketIO * style: Format code and improve consistency in websocket_input.py * refactor: update WebSocket input to use send_message and improve invoke method * refactor: wrap WebSocket messages in events before enqueueing * feat: implement WebsocketOutput component for sending messages * refactor: implement WebSocket input/output with shared connection management * refactor: simplify WebSocket output component and improve error handling * style: replace f-strings with format directives in logging statements * feat: implement WebSocket connection tracking and improve message handling * refactor: replace f-strings with format directives in logging statements * chore: Remove unused comment about f-strings in logging * fix: replace self.socketio.sid with request.sid for correct session ID handling * More changes * feat: add HTML serving capability to WebsocketInput * refactor: Improve WebsocketInput class structure and remove unused import * refactor: simplify WebsocketInput component * fix: resolve HTML file path issues in WebsocketInput * refactor: implement event processing for WebSocket input * Add example for websocket * refactor: centralize event processing and error handling in ComponentBase * fix: update websocket.yaml to correctly pass payload and socket_id * style: enhance UI design and responsiveness of WebSocket example app * style: implement light/dark mode theme based on browser preference * fix: improve dark mode implementation and add smooth transitions * style: adjust input and button spacing in WebSocket example app * feat: add info icon with popup explanation to WebSocket example app * refactor: simplify WebSocket example app interface * More adjustments * style: reduce padding above top title and adjust container spacing * Remove unnecessary whitespace * Fix a few warnings * feat: add payload encoding and format to WebSocket components * refactor: reorganize imports and improve code formatting * refactor: simplify encode_payload function * refactor: use centralized payload encoding/decoding functions * Some additional cleanup * change the default payload encoding to 'none' so that strings will be sent * Fix warning * refactor: implement WebSocket base class and enhance output functionality * feat: import request object in websocket_input.py * refactor: move common config to base class and use deep copy * refactor: merge base_info into websocket component info structures * More refactoring to allow websocket_output to share some code * refactor: make WebsocketBase abstract and enforce listen_port requirement * refactor: remove listen_port validation in WebsocketBase * feat: implement threaded WebSocket server for output component * default the encoding to none * feat: enable WebSocket server debugging * Tweak the dynamic module loader to give better output if a dynamically loaded module fails due to it not being able to be loaded by it failing to load another module. Also turn off websocket debug logs * AI-170: Add new broker type: dev_broker (#51) * feat: implement DevBroker for development purposes * refactor: convert Solace message to dictionary in receive_message * refactor: align DevBroker with solace_messaging subscription handling * More changes * More tweaks * Last few issues * refactor: standardize use of 'queue_name' in dev_broker_messaging * Remove queue_id
This change adds a 'dev_broker' broker_type that behaves like a Solace Broker, but just runs within the context of a single solace-ai-connector. As long as all flows are running within the same instance, then they can all use broker_type='dev_broker' and they will communicate like normal.
This should be fully backwards compatible.
Note - this was built on top of the websocket component changes, so the diff is against that branch.