Skip to content

Is it necessary to append headers when using RootContext's Request/RequestFuture? #1250

@sunpipi

Description

@sunpipi

Describe the bug
When calling the Request or RequestFuture methods of RootContext, the default MessageEnvelope sets the Header to nil.

request future

request

It appears that the Header of RootContext can be assigned externally, but it is not utilized in these methods. Is it necessary to include headers when invoking RootContext's Request or RequestFuture methods?

Current Workaround

I have currently implemented a workaround by explicitly setting the MessageEnvelope's header value externally through the RootContext's senderMiddleware.

Apparent Design Inconsistency

This implementation creates an apparent inconsistency where the RootContext's Header appears to serve no practical purpose in actual communication. Its only defined interface method seems to be:

  • MessageHeader() (from the messagePart interface) - which, based on my understanding, is primarily an interface method for consuming header data rather than providing it for communication.

Key Questions

  1. Does the RootContext's Header have any actual role in outbound communication?
  2. If its only purpose is through the MessageHeader() interface method, is it solely meant for data consumption rather than transmission?
  3. Should the Request/RequestFuture methods be modified to incorporate the RootContext's Header values?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions