Comments (10)
hmm I take that back, you can't do that unless you know the last message in the batch
from aeron.net.
While I see the benefit of the request, I'm hesitant to introduce changes to this code base that aren't used directly by the Aeron client. It seems like you've already got what you need in RampUp.
If you haven't already, it might be worth having a look at the Disruptor.NET.
Looking at the EventHandler in Getting started (java) it seems like it might fit with your use case.
from aeron.net.
something like this?https://github.com/AdaptiveConsulting/Aeron.NET/blob/master/src/Adaptive.Agrona/Concurrent/RingBuffer/ManyToOneRingBuffer.cs#L114
from aeron.net.
This is not what I meant. Let me rephrase my initial description.
The Read
method provides a capability of reading multiple messages one after another and clears the memory afterwards. It does not provide an access to the whole chunk of memory though. I could imagine scenarios, where one wants to have multiple writers which write messages to a buffer. Then a reader would access the whole chunk of buffer and use it somehow (send to a file/socket/something else). In this case existing Read
wouldn't be suitable - it reads messages one after another.
from aeron.net.
ahh I see similar to https://github.com/real-logic/Aeron/blob/master/aeron-client/src/main/java/io/aeron/Image.java#L515?
from aeron.net.
That's correct 👍 I'm thinking now, is it the right lvl for introducing it?
from aeron.net.
If you Read using the MessageHandler, you could capture buffer & the first index then sum up the lengths of all the individual messages. Then you have access to the whole block.
from aeron.net.
You can't do it because in any point of time (at the end) cleaning memory and moving head can be called. That's why I asked about making this explicit and calling the "raw handler" only one time.
from aeron.net.
the position is only advanced after the whole batch has been processed
https://github.com/AdaptiveConsulting/Aeron.NET/blob/master/src/Adaptive.Agrona/Concurrent/RingBuffer/ManyToOneRingBuffer.cs#L152
from aeron.net.
Thx for clarification. Closing this :)
from aeron.net.
Related Issues (20)
- Aeron.Cluster NuGet package? HOT 2
- AtomicCounter can not be used for reading HOT 1
- attempting to extend a recording throws exception HOT 5
- Add option to run the aeron-client-conductor thread as a background thread.
- Publish new version? HOT 5
- Remove Environment.Exit(-1) as default behaviour when driver connection is lost? HOT 1
- Remove support for .NET Framework 4.5
- Migration to GitHub actions for CI
- support dotnet5 plan HOT 1
- sbe generated files and cluster client offer HOT 1
- C Media Driver HOT 2
- Codec Generation HOT 2
- fatal error
- session recovery best practice in Aeron HOT 1
- use MediaDriver embedded mode in dotnet
- ExpandableArrayBuffer has exception HOT 11
- .NET 6.0 Update HOT 6
- Driver folder is not created with bat file HOT 3
- NullReferenceException when using CloseHandler
- aeron .net roadmap
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aeron.net.