nats-io / nats-kafka

NATS to Kafka Bridging
Apache License 2.0
131 stars 32 forks source link

Add message header forward for NATSToKafka connector #63

Closed rpuppo closed 2 years ago

rpuppo commented 2 years ago

Adding support for message header forward in nats-kafka connector in both directions.

variadico commented 2 years ago

Can you run goimports -w . at the top of the repo to fix the lints?

go install golang.org/x/tools/cmd/goimports@latest

And also go vet ./....

variadico commented 2 years ago

Overall, looks good, but there's just a little bit of clean up to do.

for i, elem := range slice {
  // i automatically increases from 0 to len(slice)-1
  // no need to say i++
  // that increments a copy of the index, has no effect on the behavior of the loop
}
rpuppo commented 2 years ago

Hello @variadico , retrofits done, could you please re-validate? BR, Riccardo

codecov-commenter commented 2 years ago

Codecov Report

Merging #63 (c1fab50) into main (bef0b41) will increase coverage by 0.36%. The diff coverage is 76.19%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #63      +/-   ##
==========================================
+ Coverage   67.34%   67.70%   +0.36%     
==========================================
  Files          27       27              
  Lines        1761     1790      +29     
==========================================
+ Hits         1186     1212      +26     
- Misses        446      449       +3     
  Partials      129      129              
Impacted Files Coverage Δ
server/kafka/producer.go 21.49% <0.00%> (-0.21%) :arrow_down:
server/kafka/consumer.go 12.99% <33.33%> (+1.36%) :arrow_up:
server/core/connector.go 77.77% <100.00%> (+1.99%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update bef0b41...c1fab50. Read the comment docs.

variadico commented 2 years ago

Thank you very much, @rpuppo! 🎉

rpuppo commented 2 years ago

Hello @variadico , thanks for review and merge! Do you know when we will have a new release for the natsKafka bridge available?