Now, updating the trigger to `isJSONData: true`
```
➜ openwhisk master ✗ bin/wsk -i --apihost 172.17.0.1 --auth
789c46b1-71f6-4ed5-8c54-816aa4f8c502:abczO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP
trigger update kafkatrigger -p isJSONData true
{
"activationId": "dda0958786f747d9a0958786f747d920",
"annotations": [
{
"key": "path",
"value": "whisk.system/messaging/messageHubFeed"
},
{
"key": "waitTime",
"value": 64
},
{
"key": "kind",
"value": "nodejs:6"
},
{
"key": "limits",
"value": {
"logs": 10,
"memory": 256,
"timeout": 60000
}
},
{
"key": "initTime",
"value": 345
}
],
"duration": 1046,
"end": 1534870963261,
"logs": [],
"name": "messageHubFeed",
"namespace": "whisk.system",
"publish": false,
"response": {
"result": {},
"status": "success",
"success": true
},
"start": 1534870962215,
"subject": "whisk.system",
"version": "0.0.1"
}
ok: updated trigger kafkatrigger
```
```
>Malalažbeta my weird character \xb6
```
```
[2018-08-21T17:03:42.363Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Found 1 messages with a total size of 121 bytes
[2018-08-21T17:03:42.363Z] [WARNING] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] I was asked to encode a message as JSON, but I
failed.
[2018-08-21T17:03:42.363Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Firing trigger with 1 messages
[2018-08-21T17:03:42.381Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Repsonse status code 202
[2018-08-21T17:03:42.382Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Fired trigger with activation
edb2a30fe7ae4f09b2a30fe7ae6f0982
```
```
➜ openwhisk master ✗ bin/wsk -i --apihost 172.17.0.1 --auth
789c46b1-71f6-4ed5-8c54-816aa4f8c502:abczO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP
activation get edb2a30fe7ae4f09b2a30fe7ae6f0982
ok: got activation edb2a30fe7ae4f09b2a30fe7ae6f0982
{
"namespace": "whisk.system",
"name": "kafkatrigger",
"version": "0.0.1",
"subject": "whisk.system",
"activationId": "edb2a30fe7ae4f09b2a30fe7ae6f0982",
"start": 1534871022376,
"end": 0,
"duration": 0,
"response": {
"status": "success",
"statusCode": 0,
"success": true,
"result": {
"messages": [
{
"key": null,
"offset": 44606,
"partition": 0,
"topic": "test",
"value": "\"Malalažbeta my weird character \\xb6\""
}
]
}
},
"logs": [
"{\"statusCode\":0,\"success\":true,\"activationId\":\"20b9bdc81c4142a2b9bdc81c4172a273\",\"rule\":\"whisk.system/myrule\",\"action\":\"whisk.system/myecho\"}"
],
"annotations": [],
"publish": false
}
```
```
>"Malalažbeta my weird character \xb6"
```
```
[2018-08-21T17:05:18.194Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Found 1 messages with a total size of 125 bytes
[2018-08-21T17:05:18.194Z] [WARNING] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] I was asked to encode a message as JSON, but I
failed.
[2018-08-21T17:05:18.194Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Firing trigger with 1 messages
[2018-08-21T17:05:18.204Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Repsonse status code 202
[2018-08-21T17:05:18.204Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Fired trigger with activation
18975da686bc4ad5975da686bcaad5ba
```
```
➜ openwhisk master ✗ bin/wsk -i --apihost 172.17.0.1 --auth
789c46b1-71f6-4ed5-8c54-816aa4f8c502:abczO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP
activation get 18975da686bc4ad5975da686bcaad5ba
ok: got activation 18975da686bc4ad5975da686bcaad5ba
{
"namespace": "whisk.system",
"name": "kafkatrigger",
"version": "0.0.1",
"subject": "whisk.system",
"activationId": "18975da686bc4ad5975da686bcaad5ba",
"start": 1534871118201,
"end": 0,
"duration": 0,
"response": {
"status": "success",
"statusCode": 0,
"success": true,
"result": {
"messages": [
{
"key": null,
"offset": 44607,
"partition": 0,
"topic": "test",
"value": "\"\"Malalažbeta my weird character \\xb6\"\""
}
]
}
},
"logs": [
"{\"statusCode\":0,\"success\":true,\"activationId\":\"6a7eb5dfe438432dbeb5dfe438032d97\",\"rule\":\"whisk.system/myrule\",\"action\":\"whisk.system/myecho\"}"
],
"annotations": [],
"publish": false
}
```
```
>{"hello": "Malalažbeta my weird character \xb6"}
```
```
[2018-08-21T17:06:35.384Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Found 1 messages with a total size of 138 bytes
[2018-08-21T17:06:35.385Z] [WARNING] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] I was asked to encode a message as JSON, but I
failed.
[2018-08-21T17:06:35.385Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Firing trigger with 1 messages
[2018-08-21T17:06:35.401Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Repsonse status code 202
[2018-08-21T17:06:35.401Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Fired trigger with activation
49385e19d5f944c5b85e19d5f914c5e2
```
```
ok: got activation 49385e19d5f944c5b85e19d5f914c5e2
{
"namespace": "whisk.system",
"name": "kafkatrigger",
"version": "0.0.1",
"subject": "whisk.system",
"activationId": "49385e19d5f944c5b85e19d5f914c5e2",
"start": 1534871195398,
"end": 0,
"duration": 0,
"response": {
"status": "success",
"statusCode": 0,
"success": true,
"result": {
"messages": [
{
"key": null,
"offset": 44608,
"partition": 0,
"topic": "test",
"value": "\"{\"hello\": \"Malalažbeta my weird character
\\xb6\"}\""
}
]
}
},
"logs": [
"{\"statusCode\":0,\"success\":true,\"activationId\":\"0b5710a7c326437e9710a7c326e37ebf\",\"rule\":\"whisk.system/myrule\",\"action\":\"whisk.system/myecho\"}"
],
"annotations": [],
"publish": false
}
```
```
>"{"hello": "Malalažbeta my weird character \xb6"}"
```
```
[2018-08-21T17:08:15.841Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Found 1 messages with a total size of 142 bytes
[2018-08-21T17:08:15.847Z] [WARNING] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] I was asked to encode a message as JSON, but I
failed.
[2018-08-21T17:08:15.848Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Firing trigger with 1 messages
[2018-08-21T17:08:15.893Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Repsonse status code 202
[2018-08-21T17:08:15.893Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Fired trigger with activation
c09f85197c2648fd9f85197c2688fdba
```
```
➜ openwhisk master ✗ bin/wsk -i --apihost 172.17.0.1 --auth
789c46b1-71f6-4ed5-8c54-816aa4f8c502:abczO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP
activation get c09f85197c2648fd9f85197c2688fdba
ok: got activation c09f85197c2648fd9f85197c2688fdba
{
"namespace": "whisk.system",
"name": "kafkatrigger",
"version": "0.0.1",
"subject": "whisk.system",
"activationId": "c09f85197c2648fd9f85197c2688fdba",
"start": 1534871295890,
"end": 0,
"duration": 0,
"response": {
"status": "success",
"statusCode": 0,
"success": true,
"result": {
"messages": [
{
"key": null,
"offset": 44609,
"partition": 0,
"topic": "test",
"value": "\"\"{\"hello\": \"Malalažbeta my weird character
\\xb6\"}\"\""
}
]
}
},
"logs": [
"{\"statusCode\":0,\"success\":true,\"activationId\":\"e4a5533247c44451a5533247c41451f6\",\"rule\":\"whisk.system/myrule\",\"action\":\"whisk.system/myecho\"}"
],
"annotations": [],
"publish": false
}
```
```
>"{\"hello\": \"Malalažbeta my weird character \xb6\"}"
```
```
[2018-08-21T17:09:48.169Z] [WARNING] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] I was asked to encode a message as JSON, but I
failed.
[2018-08-21T17:09:48.169Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Firing trigger with 1 messages
[2018-08-21T17:09:48.178Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Repsonse status code 202
[2018-08-21T17:09:48.178Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Fired trigger with activation
c14b90087d2442408b90087d24a240f9
```
```
➜ openwhisk master ✗ bin/wsk -i --apihost 172.17.0.1 --auth
789c46b1-71f6-4ed5-8c54-816aa4f8c502:abczO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP
activation get c14b90087d2442408b90087d24a240f9
ok: got activation c14b90087d2442408b90087d24a240f9
{
"namespace": "whisk.system",
"name": "kafkatrigger",
"version": "0.0.1",
"subject": "whisk.system",
"activationId": "c14b90087d2442408b90087d24a240f9",
"start": 1534871388176,
"end": 0,
"duration": 0,
"response": {
"status": "success",
"statusCode": 0,
"success": true,
"result": {
"messages": [
{
"key": null,
"offset": 44610,
"partition": 0,
"topic": "test",
"value": "\"\"{\\\"hello\\\": \\\"Malalažbeta my weird
character \\xb6\\\"}\"\""
}
]
}
},
"logs": [
"{\"statusCode\":0,\"success\":true,\"activationId\":\"903d0d44e9d24f06bd0d44e9d26f06d4\",\"rule\":\"whisk.system/myrule\",\"action\":\"whisk.system/myecho\"}"
],
"annotations": [],
"publish": false
}
```
```
>{\"hello\": \"Malalažbeta my weird character \xb6\"}
```
```
[2018-08-21T17:11:47.930Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Found 1 messages with a total size of 146 bytes
[2018-08-21T17:11:47.930Z] [WARNING] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] I was asked to encode a message as JSON, but I
failed.
[2018-08-21T17:11:47.930Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Firing trigger with 1 messages
[2018-08-21T17:11:47.946Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Repsonse status code 202
[2018-08-21T17:11:47.947Z] [INFO] [??] [kafkatriggers]
[/whisk.system/kafkatrigger] Fired trigger with activation
5aaf6a7957704d0aaf6a795770ed0a4e
```
```
➜ openwhisk master ✗ bin/wsk -i --apihost 172.17.0.1 --auth
789c46b1-71f6-4ed5-8c54-816aa4f8c502:abczO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP
activation get 5aaf6a7957704d0aaf6a795770ed0a4e
ok: got activation 5aaf6a7957704d0aaf6a795770ed0a4e
{
"namespace": "whisk.system",
"name": "kafkatrigger",
"version": "0.0.1",
"subject": "whisk.system",
"activationId": "5aaf6a7957704d0aaf6a795770ed0a4e",
"start": 1534871507939,
"end": 0,
"duration": 0,
"response": {
"status": "success",
"statusCode": 0,
"success": true,
"result": {
"messages": [
{
"key": null,
"offset": 44611,
"partition": 0,
"topic": "test",
"value": "\"{\\\"hello\\\": \\\"Malalažbeta my weird
character \\xb6\\\"}\""
}
]
}
},
"logs": [
"{\"statusCode\":0,\"success\":true,\"activationId\":\"9b3583fea8e64cf3b583fea8e61cf3a4\",\"rule\":\"whisk.system/myrule\",\"action\":\"whisk.system/myecho\"}"
],
"annotations": [],
"publish": false
}
```
[ Full content available at:
https://github.com/apache/incubator-openwhisk-package-kafka/pull/279 ]
This message was relayed via gitbox.apache.org for [email protected]