Package org.acemq.amqp.transport
Class ConnectionConfig
java.lang.Object
org.acemq.amqp.transport.ConnectionConfig
Everything a transport needs in order to open a connection.
-
Nested Class Summary
Nested Classes -
Method Summary
-
Method Details
-
url
- Parameters:
url- broker URL whose scheme selects the transport, for exampleamqp://localhost:5672- Returns:
- a builder with safe defaults already applied
-
url
-
username
-
password
-
virtualHost
-
clientName
-
connectionTimeout
-
confirmTimeout
- Returns:
- how long a publish waits for the broker to confirm it
-
blockedTimeout
- Returns:
- how long a publish waits for a blocked broker to resume before it is refused. Zero by default: a publish made while the broker is blocked is refused at once, as in the other AceMQ libraries, so the caller decides whether to wait. A positive value waits up to that long instead, for an application that would rather ride out a brief memory alarm than handle the refusal
-
security
- Returns:
- how this connection is protected. Never null: a connection always has a policy, and the default is the safe one
-
maxOutstandingPublishes
public int maxOutstandingPublishes()How many publishes may be waiting for a confirm at once.Only asynchronous publishing uses this, and it is the setting that keeps it honest: a publisher that hands out futures faster than the broker confirms them accumulates unconfirmed messages in memory until the process dies. Once the limit is reached, publishing blocks — turning a memory leak into backpressure, which is the trade a queueing library should make.
- Returns:
- the ceiling on unconfirmed publishes
-
publisherConfirms
public boolean publisherConfirms()- Returns:
- whether the caller's own publishes wait for a publisher confirm; what the library publishes on the caller's behalf always does
- See Also:
-
scheme
- Returns:
- the scheme of
url(), used to select a transport
-
toString
-