fun AgentMessage.toOutboundContext(connection: ConnectionRecord): Single<OutboundMessageContext>
Returns an OutboundMessageContext constructed from an AgentMessage and a given ConnectionRecord. This only puts the connection ID in the context.
connection
- is a ConnectionRecord to get the ID from.
fun AgentMessage.toOutboundContext(connectionContext: ConnectionContext): Single<OutboundMessageContext>
Returns an OutboundMessageContext constructed from an AgentMessage and a given ConnectionContext. The connection context from the record is checked and the corresponding outbound context is constructed.