Coder Social home page Coder Social logo

Comments (6)

edenhill avatar edenhill commented on August 21, 2024

You are right, the pointer type is not needed.

from confluent-kafka-go.

ljackson avatar ljackson commented on August 21, 2024

I nearly have a working solution for both produce and produce_batch I will attach a proposed diff for comments when I have something working

from confluent-kafka-go.

ljackson avatar ljackson commented on August 21, 2024

Well this now works for p.Produce calls see note about opaque param and opaque in kafka.Message the msg one overrides the param for now. This panics at runtime for batch version but this is a POC for your consideration. Also the cgomap type as uint64 so you don't have worrie about overflow IMO also should make the map faster.

This is based on @edenhill your testing branch with master merged in and with your change above

opaque_test.patch.txt

from confluent-kafka-go.

ljackson avatar ljackson commented on August 21, 2024

I just looked at your changes from int to uintptr so that isn't taken into account above. But I do think you want to make the map in setup() rather than the few other places your doing it now. Thx

from confluent-kafka-go.

edenhill avatar edenhill commented on August 21, 2024

uint64 would be very convenient but since we need to cast it to a pointer it wont work on 32-bit systems.
We're thus limited to a 32-bit id and the avoid-zero wrapping code at this time.
(I could it would be possible to provide a 64-bit implementaton supported platforms with build tags, but that's a future micro optimization excercise)

from confluent-kafka-go.

edenhill avatar edenhill commented on August 21, 2024

Thanks @ljackson, the opaque fix will be incorporated on the kafkatesting branch that will soon be meregd.

from confluent-kafka-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.