citrusframework / citrusframework/citrus

Binary message not the same as documentation?

Open
#1,147 0 comments 0 reactions 0 assignees View on GitHub
docs enhancement
Dominant language
Java
Stars
485
Forks
155
Avg merge
4d 22h
Merged PRs (30d)
6

Description

**Citrus Version**
4.1.1

**Question**
Is the documentation wrong with sending byte messages or any other type other than string?

**What I've tried so far**
Tried to send a message with the type of `BINARY` and expected the message to not be text but a byte type, but instead the message was delivered as `TEXT`

**Additional information**
According to the documentation it should be as simple as doing the following:

```
send("someEndpoint")
.message()
.type(MessageType.BINARY)
.body("Hello World")
```

But after spending a few days I found out for sending you have to actually do this (Well it at least gave me the results I need):

```
send("someEndpoint")
.message()
.type(MessageType.BINARY)
.body("Hello World")
.process(toBinary().encoding(StandardCharsets.UTF_8))
```

I found this here: [citrus-samples](https://github.com/citrusframework/citrus-samples/blob/main/sample-binary/src/test/java/com/consol/citrus/samples/todolist/TodoListIT.java)

The documentation where it shows it's just as easy as setting the type: [reference-documentation](https://citrusframework.org/citrus/reference/4.1.1/html/index.html#binary-stream-message-validation)
[samples-binary](https://citrusframework.org/samples/binary/)

Contributor guide

Open the contributing guide

Research direction

Start by comparing the binary stream message validation section in the 4.1.1 reference documentation with sample-binary's TodoListIT.java. Reproduce the documented message setup and the sample setup to confirm the behavior. Done means the documentation accurately explains how binary messages are sent and matches the working example.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.