Class: Legion::LLM::Transport::Messages::FleetResponse
- Inherits:
-
Legion::LLM::Transport::Message
- Object
- Transport::Message
- Legion::LLM::Transport::Message
- Legion::LLM::Transport::Messages::FleetResponse
- Defined in:
- lib/legion/llm/transport/messages/fleet_response.rb
Constant Summary
Constants inherited from Legion::LLM::Transport::Message
Legion::LLM::Transport::Message::LLM_ENVELOPE_KEYS
Instance Method Summary collapse
- #expiration ⇒ Object
- #headers ⇒ Object
- #priority ⇒ Object
-
#publish(options = @options) ⇒ Object
Override publish to use the AMQP default exchange (”).
- #routing_key ⇒ Object
- #type ⇒ Object
Methods inherited from Legion::LLM::Transport::Message
#app_id, #correlation_id, #message, #message_context, #message_id, #tracing_headers
Instance Method Details
#expiration ⇒ Object
13 |
# File 'lib/legion/llm/transport/messages/fleet_response.rb', line 13 def expiration = nil |
#headers ⇒ Object
15 16 17 |
# File 'lib/legion/llm/transport/messages/fleet_response.rb', line 15 def headers super.merge(tracing_headers) end |
#priority ⇒ Object
12 |
# File 'lib/legion/llm/transport/messages/fleet_response.rb', line 12 def priority = 0 |
#publish(options = @options) ⇒ Object
Override publish to use the AMQP default exchange (”). The base class’s publish calls exchange.publish(…), but the default exchange is accessed via channel.default_exchange in Bunny.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/legion/llm/transport/messages/fleet_response.rb', line 22 def publish( = @options) raise unless @valid validate_payload_size channel.default_exchange.publish( , routing_key: routing_key, content_type: [:content_type] || content_type, content_encoding: [:content_encoding] || content_encoding, headers: headers, type: type, priority: priority, message_id: , correlation_id: correlation_id, app_id: app_id, timestamp: ) rescue Bunny::ConnectionClosedError, Bunny::ChannelAlreadyClosed, Bunny::NetworkErrorWrapper, IOError, Timeout::Error => e (e) end |
#routing_key ⇒ Object
11 |
# File 'lib/legion/llm/transport/messages/fleet_response.rb', line 11 def routing_key = @options[:reply_to] |
#type ⇒ Object
10 |
# File 'lib/legion/llm/transport/messages/fleet_response.rb', line 10 def type = 'llm.fleet.response' |