Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class ThreadedSocketInitiator extends AbstractSocketInitiator {

private ThreadedSocketInitiator(Builder builder) throws ConfigError {
super(builder.application, builder.messageStoreFactory, builder.settings,
builder.logFactory, builder.messageFactory);
builder.logFactory, builder.messageFactory, builder.numReconnectThreads);

if (builder.queueCapacity >= 0) {
eventHandlingStrategy
Expand All @@ -47,10 +47,18 @@ public static Builder newBuilder() {
}

public static final class Builder extends AbstractSessionConnectorBuilder<Builder, ThreadedSocketInitiator> {

int numReconnectThreads = 3;

private Builder() {
super(Builder.class);
}

public Builder withReconnectThreads(int numReconnectThreads) throws ConfigError {
this.numReconnectThreads = numReconnectThreads;
return this;
}

@Override
protected ThreadedSocketInitiator doBuild() throws ConfigError {
return new ThreadedSocketInitiator(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ private void createSessions(SessionSettings settings) throws ConfigError, FieldC
}
} catch (Throwable t) {
if (continueInitOnError) {
log.error("error during session initialization, continuing...", t);
log.error("error during session initialization for {}, continuing...", sessionID, t);
} else {
throw t instanceof ConfigError ? (ConfigError) t : new ConfigError(
"error during session initialization", t);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ private void createSessions() throws ConfigError, FieldConvertError {
}
} catch (final Throwable e) {
if (continueInitOnError) {
log.error("error during session initialization, continuing...", e);
log.error("error during session initialization for {}, continuing...", sessionID, e);
} else {
throw e instanceof ConfigError ? (ConfigError) e : new ConfigError(
"error during session initialization", e);
Expand Down