Closed alexandrebrilhante closed 6 years ago
I was waiting for someone to come and ask for it :D I'll take a look at it this weekend.
Also consider using RDKafka.jl which I started as a way to overcome complicated consumer group logic in recent versions of Kafka server. I'll try to upgrade both of the packages in nearest time.
Also note that I've tried building RDKafka only on Linux. It might also work on macos, while Windows support will most likely come last. Feel free to open feature requests for whatever part you are missing.
Please check out master of Kafka.jl. Here I'm trying to follow official suggestion and not add Project.toml yet, presumably package should still work given only REQUIRE, but you get into a trouble, let me know.
As a starting point, take a look at examples/all.jl file.
(I will need some more time to update RDKafka.jl)
julia> using Kafka
[ Info: Precompiling Kafka [ead98f13-3562-56ef-8e28-822b2114fc97]
WARNING: could not import Base.produce into Kafka
WARNING: could not import Base.consume into Kafka
ERROR: LoadError: LoadError: LoadError: UndefVarError: $ not defined
Stacktrace:
[1] maketable(::UInt32) at /Users/brilhana/.julia/packages/Kafka/1hzXO/src/crc32.jl:11
[2] top-level scope at none:0
[3] include at ./boot.jl:317 [inlined]
[4] include_relative(::Module, ::String) at ./loading.jl:1038
[5] include at ./sysimg.jl:29 [inlined]
[6] include(::String) at /Users/brilhana/.julia/packages/Kafka/1hzXO/src/Kafka.jl:1
[7] top-level scope at none:0
[8] include at ./boot.jl:317 [inlined]
[9] include_relative(::Module, ::String) at ./loading.jl:1038
[10] include at ./sysimg.jl:29 [inlined]
[11] include(::String) at /Users/brilhana/.julia/packages/Kafka/1hzXO/src/Kafka.jl:1
[12] top-level scope at none:0
[13] include at ./boot.jl:317 [inlined]
[14] include_relative(::Module, ::String) at ./loading.jl:1038
[15] include(::Module, ::String) at ./sysimg.jl:29
[16] top-level scope at none:2
[17] eval at ./boot.jl:319 [inlined]
[18] eval(::Expr) at ./client.jl:389
[19] top-level scope at ./none:3
in expression starting at /Users/brilhana/.julia/packages/Kafka/1hzXO/src/crc32.jl:21
in expression starting at /Users/brilhana/.julia/packages/Kafka/1hzXO/src/core.jl:6
in expression starting at /Users/brilhana/.julia/packages/Kafka/1hzXO/src/Kafka.jl:15
ERROR: Failed to precompile Kafka [ead98f13-3562-56ef-8e28-822b2114fc97] to /Users/brilhana/.julia/compiled/v1.0/Kafka/Audqi.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] macro expansion at ./logging.jl:313 [inlined]
[3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1184
[4] _require(::Base.PkgId) at ./logging.jl:311
[5] require(::Base.PkgId) at ./loading.jl:852
[6] macro expansion at ./logging.jl:311 [inlined]
[7] require(::Module, ::Symbol) at ./loading.jl:834
Did you check out master?
I did. I'll look into it in the upcoming days and submit a PR if needed.
It's quite strange because the error you've posted is clearly caused by importing produce
and consume
from Base
which was the case with the previous version, but isn't there anymore. Did you run:
]add Kafka#master
or used some other method to add Kafka to your environment/project? Did you run ]up Kafka
?
It worked, thank you!
Any hope of seeing this package work with 1.0 in the foreseeable future?