-
Notifications
You must be signed in to change notification settings - Fork 83
Custom configuration for consumer and producer #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# Conflicts: # embedded-kafka/src/main/scala/net/manub/embeddedkafka/EmbeddedKafkaConfig.scala
| import scala.language.postfixOps | ||
|
|
||
| class EmbeddedKafkaCustomConfigSpec extends EmbeddedKafkaSpecSupport with EmbeddedKafka { | ||
| val TWO_MEGABYTES = 2097152 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these should be probably be named TwoMegabytes and ThreeMegabytes as per http://docs.scala-lang.org/style/naming-conventions.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point
| val THREE_MEGABYTES = 3145728 | ||
|
|
||
| "the custom config" should { | ||
| "should allow pass additional producer parameters" in { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should is redundant here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ehhh, yes :)
| } | ||
|
|
||
| def generateMessageOfLength(length: Int): String = Stream.continually(util.Random.nextPrintableChar) take length mkString | ||
| } No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline please (at the end of file)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
manub
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the effort! Please fix a couple of minor style issues and then I'll merge it.
|
Fixed |
|
Thanks! You were mentioning you need this on 0.8 branch? |
|
Sorry, I made a mistake. I thought about Kafka 0.9, but no branch here |
Hi
We need to test message flow with messages bigger than default 1MB.
I've prepared a pull request with additional custom producer and consumer configurations.
I also created a unit test for it and updated README with code example.
Can you take a look ?
Any comments welcome
In near future, I plan to merge it to 0.8 branch, because we need it on Spark 1.6
Regards