add docs for durMbx settings, see #1863
This commit is contained in:
parent
56ce7a0ecd
commit
3699c6856e
8 changed files with 54 additions and 7 deletions
|
|
@ -4,16 +4,30 @@
|
|||
|
||||
# This is the reference config file that contains all the default settings.
|
||||
# Make your edits/overrides in your application.conf.
|
||||
#
|
||||
# for more information see <https://github.com/kr/beanstalkd/blob/v1.3/doc/protocol.txt>
|
||||
|
||||
akka {
|
||||
actor {
|
||||
mailbox {
|
||||
beanstalk {
|
||||
# hostname to connect to
|
||||
hostname = "127.0.0.1"
|
||||
|
||||
# port to connect to
|
||||
port = 11300
|
||||
|
||||
# wait period in case of a connection failure before reconnect
|
||||
reconnect-window = 5s
|
||||
|
||||
# integer number of seconds to wait before putting the job in
|
||||
# the ready queue. The job will be in the "delayed" state during this time.
|
||||
message-submit-delay = 0s
|
||||
message-submit-timeout = 5s
|
||||
|
||||
# time to run -- is an integer number of seconds to allow a worker
|
||||
# to run this job. This time is counted from the moment a worker reserves
|
||||
# this job. If the worker does not delete, release, or bury the job within
|
||||
# <ttr> seconds, the job will time out and the server will release the job.
|
||||
message-time-to-live = 120s
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class BeanstalkBasedMessageQueue(_owner: ActorContext, val settings: BeanstalkMa
|
|||
// ===== For MessageQueue =====
|
||||
|
||||
def enqueue(receiver: ActorRef, envelope: Envelope) {
|
||||
Some(queue.get.put(65536, messageSubmitDelaySeconds, messageTimeToLiveSeconds, serialize(envelope)).toInt)
|
||||
queue.get.put(65536, messageSubmitDelaySeconds, messageTimeToLiveSeconds, serialize(envelope)).toInt
|
||||
}
|
||||
|
||||
def dequeue(): Envelope = try {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ class BeanstalkMailboxSettings(val systemSettings: ActorSystem.Settings, val use
|
|||
val Port = getInt("port")
|
||||
val ReconnectWindow = Duration(getMilliseconds("reconnect-window"), MILLISECONDS)
|
||||
val MessageSubmitDelay = Duration(getMilliseconds("message-submit-delay"), MILLISECONDS)
|
||||
val MessageSubmitTimeout = Duration(getMilliseconds("message-submit-timeout"), MILLISECONDS)
|
||||
val MessageTimeToLive = Duration(getMilliseconds("message-time-to-live"), MILLISECONDS)
|
||||
|
||||
}
|
||||
|
|
@ -4,23 +4,47 @@
|
|||
|
||||
# This is the reference config file that contains all the default settings.
|
||||
# Make your edits/overrides in your application.conf.
|
||||
#
|
||||
# For more information see <https://github.com/robey/kestrel/>
|
||||
|
||||
akka {
|
||||
actor {
|
||||
mailbox {
|
||||
file-based {
|
||||
# directory below which this queue resides
|
||||
directory-path = "./_mb"
|
||||
|
||||
# attempting to add an item after the queue reaches this size (in items) will fail.
|
||||
max-items = 2147483647
|
||||
|
||||
# attempting to add an item after the queue reaches this size (in bytes) will fail.
|
||||
max-size = 2147483647 bytes
|
||||
max-items = 2147483647
|
||||
|
||||
# attempting to add an item larger than this size (in bytes) will fail.
|
||||
max-item-size = 2147483647 bytes
|
||||
|
||||
# maximum expiration time for this queue (seconds).
|
||||
max-age = 0s
|
||||
|
||||
# maximum journal size before the journal should be rotated.
|
||||
max-journal-size = 16 MiB
|
||||
|
||||
# maximum size of a queue before it drops into read-behind mode.
|
||||
max-memory-size = 128 MiB
|
||||
|
||||
# maximum overflow (multiplier) of a journal file before we re-create it.
|
||||
max-journal-overflow = 10
|
||||
|
||||
# absolute maximum size of a journal file until we rebuild it, no matter what.
|
||||
max-journal-size-absolute = 9223372036854775807 bytes
|
||||
|
||||
# whether to drop older items (instead of newer) when the queue is full
|
||||
discard-old-when-full = on
|
||||
|
||||
# whether to keep a journal file at all
|
||||
keep-journal = on
|
||||
|
||||
# whether to sync the journal after each transaction
|
||||
sync-journal = off
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,12 +4,17 @@
|
|||
|
||||
# This is the reference config file that contains all the default settings.
|
||||
# Make your edits/overrides in your application.conf.
|
||||
#
|
||||
# for more information see <http://redis.io/>
|
||||
|
||||
akka {
|
||||
actor {
|
||||
mailbox {
|
||||
redis {
|
||||
# hostname of where the redis queue resides
|
||||
hostname = "127.0.0.1"
|
||||
|
||||
# port at which the redis queue resides
|
||||
port = 6379
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,15 +4,21 @@
|
|||
|
||||
# This is the reference config file that contains all the default settings.
|
||||
# Make your edits/overrides in your application.conf.
|
||||
#
|
||||
# For more information see <http://wiki.apache.org/hadoop/ZooKeeper>
|
||||
|
||||
akka {
|
||||
actor {
|
||||
mailbox {
|
||||
zookeeper {
|
||||
# host and port to connect to ZooKeeper
|
||||
server-addresses = "127.0.0.1:2181"
|
||||
|
||||
# timeout after which an unreachable client is considered dead and its session is closed
|
||||
session-timeout = 60s
|
||||
|
||||
# maximum wait period while connecting to ZooKeeper service
|
||||
connection-timeout = 60s
|
||||
blocking-queue = on
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class ZooKeeperBasedMessageQueue(_owner: ActorContext, val settings: ZooKeeperBa
|
|||
settings.ZkServerAddresses,
|
||||
settings.SessionTimeout,
|
||||
settings.ConnectionTimeout)
|
||||
private val queue = new ZooKeeperQueue[Array[Byte]](zkClient, queuePathTemplate.format(name), settings.BlockingQueue)
|
||||
private val queue = new ZooKeeperQueue[Array[Byte]](zkClient, queuePathTemplate.format(name), true)
|
||||
|
||||
def enqueue(receiver: ActorRef, envelope: Envelope) {
|
||||
queue.enqueue(serialize(envelope))
|
||||
|
|
|
|||
|
|
@ -20,6 +20,5 @@ class ZooKeeperBasedMailboxSettings(val systemSettings: ActorSystem.Settings, va
|
|||
val ZkServerAddresses = getString("server-addresses")
|
||||
val SessionTimeout = Duration(getMilliseconds("session-timeout"), MILLISECONDS)
|
||||
val ConnectionTimeout = Duration(getMilliseconds("connection-timeout"), MILLISECONDS)
|
||||
val BlockingQueue = getBoolean("blocking-queue")
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue