dependabot-preview[bot] on nuget
dependabot-preview[bot] on nuget
Bump Google.Protobuf from 3.15.… (compare)
What are the minimal settings I need to get cluster sharding working?
This does not seem to be enough:
akka {
# here we are configuring log levels
log-config-on-start = off
stdout-loglevel = DEBUG
loglevel = DEBUG
# this config section will be referenced as akka.actor
actor {
debug {
receive = on
autoreceive = on
lifecycle = on
event-stream = on
unhandled = on
}
serializers {
wire = "Akka.Serialization.WireSerializer, Akka.Serialization.Wire"
}
serialization-bindings {
"System.Object" = wire
}
}
remote {
helios.tcp {
public-hostname = "localhost"
hostname = "localhost"
port = 0
}
}
cluster {
auto-down-unreachable-after = 5s
sharding {
least-shard-allocation-strategy.rebalance-threshold = 3
}
}
persistence {
# publish-plugin-commands = on
journal {
plugin = "akka.persistence.journal.sqlite"
sqlite {
class = "Akka.Persistence.Sqlite.Journal.SqliteJournal, Akka.Persistence.Sqlite"
plugin-dispatcher = "akka.actor.default-dispatcher"
table-name = event_journal
metadata-table-name = journal_metadata
auto-initialize = on
connection-string-name = "SqliteDb"
}
}
snapshot-store {
plugin = "akka.persistence.snapshot-store.sqlite"
sqlite {
# Class name of the plugin.
class = "Akka.Persistence.Sqlite.Snapshot.SqliteSnapshotStore, Akka.Persistence.Sqlite"
# Dispatcher for the plugin actor.
plugin-dispatcher = "akka.persistence.dispatchers.default-plugin-dispatcher"
# Dispatcher for streaming snapshot IO.
stream-dispatcher = "akka.persistence.dispatchers.default-stream-dispatcher"
table-name = snapshot
auto-initialize = on
connection-string-name = "SqliteDb"
}
}
}
}
[WARNING][10/11/2016 1:07:12 PM][Thread 0004][[akka://example/user/sharding/product#924346451]] Trying to register to coordinator at [], but no acknowledgement. Total [12] buffered messages.
private static void ShardingExample(ActorSystem system)
{
var sharding = ClusterSharding.Get(system);
var shardRef = sharding.Start("product", Props.Create(() => new Product()), ClusterShardingSettings.Create(system),
message =>
{
var productMessage = message as IProductMessage;
return productMessage != null ? Tuple.Create(productMessage.Id.Value, message) : null;
}, message => "0001");
shardRef.Tell(new CreateProduct(ProductId.CreateAsin("ACME001"), "Jetpack"));
shardRef.Tell(new CreateProduct(ProductId.CreateAsin("ACME002"), "Giant magnet"));
var rand = new Random();
for (int idx = 0; idx < 10; idx++)
{
var productId = ProductId.CreateAsin($"ACME00{rand.Next(1, 3)}");
shardRef.Tell(new SubmitReview(productId, rand.Next(1, 6)));
}
}
@damianReeves are you talking about adding new nodes at the same time as roles, or it is just roles to a node?
+
All Conversations
Activate or click this element to toggle the profile menu
Search
Favourites
People
akkadotnet
•
Home
•
Billing
•
Get Gitter Apps
•
Sign Out
Add a room
akka.net
101
Leave
Hide
AkkaStreams
Leave
Hide
All Rooms
dotnet-core
akkadotnet.github.com
Wire
Peter Bergman @ akkadotnet/akka.net
Cool, thx
Arjen Smits @ akkadotnet/akka.net
ah yes, if you want to know if a child exists checking for the nobody status is faster