Skip to content

Commit

Permalink
Merge pull request #341 from batchcorp/blinktag/azure_write_fix
Browse files Browse the repository at this point in the history
Doc and Azure Service Bus fixes
  • Loading branch information
blinktag committed Feb 27, 2023
2 parents 0fd38f1 + c65e929 commit 361fd81
Show file tree
Hide file tree
Showing 8 changed files with 93 additions and 93 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ INFO[0000] Successfully wrote message to topic 'foo' pkg=kafka/write.go
$ cat mydata.json
[{"key": "value1"},{"key": "value2"}]

$ cat mydata.json | plumber write kafka --topics foo --json-array
$ cat mydata.json | plumber write kafka --topics foo --input-as-json-array

INFO[0000] Successfully wrote message to topic 'foo' pkg=kafka/write.go
INFO[0000] Successfully wrote message to topic 'foo' pkg=kafka/write.go
Expand Down
4 changes: 2 additions & 2 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,15 +379,15 @@ Publishing to a topic
```bash
export SERVICEBUS_CONNECTION_STRING="Endpoint=sb://plumbertopictest.servicebus.windows.net/;SharedAccessKeyName=...."
plumber write azure --topic="new-orders" --input="{\"order_id\": \"A-3458-654-1\", \"status\": \"processed\"}"
plumber write azure-service-bus --topic="new-orders" --input="{\"order_id\": \"A-3458-654-1\", \"status\": \"processed\"}"
```
Publishing to a queue
```bash
export SERVICEBUS_CONNECTION_STRING="Endpoint=sb://plumbertopictest.servicebus.windows.net/;SharedAccessKeyName=...."
plumber write azure --queue="new-orders" --input="{\"order_id\": \"A-3458-654-1\", \"status\": \"processed\"}"
plumber write azure-service-bus --queue="new-orders" --input="{\"order_id\": \"A-3458-654-1\", \"status\": \"processed\"}"
```
##### Azure Event Hub
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/batchcorp/kong v0.2.17-batch-fix
github.com/batchcorp/natty v0.0.16
github.com/batchcorp/pgoutput v0.3.2
github.com/batchcorp/plumber-schemas v0.0.177
github.com/batchcorp/plumber-schemas v0.0.178
github.com/batchcorp/rabbit v0.1.17
github.com/batchcorp/thrifty v0.0.10
github.com/eclipse/paho.mqtt.golang v1.2.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ github.com/batchcorp/natty v0.0.16 h1:RN20W2rlA1GtPzY3ioYIjqY0UlIFnH9Rs2c1nWajxc
github.com/batchcorp/natty v0.0.16/go.mod h1:9vbgoZghKr/2FtueAquAlRacCSnEgfgTSA2eX2gpO54=
github.com/batchcorp/pgoutput v0.3.2 h1:Jck/nJLwXWmsNHF2iEfjFWrsds5LLGtqu6y6TjjU8Aw=
github.com/batchcorp/pgoutput v0.3.2/go.mod h1:xzkr73rAlqUdvt2oMAQav1lIt6xnG8bqYYXt4GrXM/I=
github.com/batchcorp/plumber-schemas v0.0.177 h1:2u+1VPTUpFexl+u/H1tlSMiJV9OPzlQjXJLqeWgzJqs=
github.com/batchcorp/plumber-schemas v0.0.177/go.mod h1:KxBXjHwZhPZoJryfv0c+aGFntx+rw2euYOqcNgqQlik=
github.com/batchcorp/plumber-schemas v0.0.178 h1:wgp0oHIiMr2qJ8CjLjOh5bjKZILCfpVEJxPQ5yzOEiI=
github.com/batchcorp/plumber-schemas v0.0.178/go.mod h1:KxBXjHwZhPZoJryfv0c+aGFntx+rw2euYOqcNgqQlik=
github.com/batchcorp/plz v0.9.2 h1:bPqb+sn7OUrpHjeTEI9YO4BJS9IQ7AstDDz2gn+tcn8=
github.com/batchcorp/plz v0.9.2/go.mod h1:3gacX+hQo+xvl0vtLqCMufzxuNCwt4geAVOMt2LQYfE=
github.com/batchcorp/rabbit v0.1.17 h1:dui1W7FLTrNxyVlDN+G+6d8LXz8HBhVAcUethXql9vQ=
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func convertJSONInput(value string) []string {

jsonArray := gjson.Parse(value)
if !jsonArray.IsArray() {
logrus.Fatal("--json-array option was passed, but input data is not a valid JSON array")
logrus.Fatal("--input-as-json-array option was passed, but input data is not a valid JSON array")
}

jsonArray.ForEach(func(key, value gjson.Result) bool {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ github.com/batchcorp/natty
# github.com/batchcorp/pgoutput v0.3.2
## explicit; go 1.15
github.com/batchcorp/pgoutput
# github.com/batchcorp/plumber-schemas v0.0.177
# github.com/batchcorp/plumber-schemas v0.0.178
## explicit; go 1.16
github.com/batchcorp/plumber-schemas/build/go/protos
github.com/batchcorp/plumber-schemas/build/go/protos/args
Expand Down

0 comments on commit 361fd81

Please sign in to comment.