func DefaultConfig() *Config {
	return &Config{
		MaxRetries:     defaultMaxRetries,
		InitialBackoff: defaultInitialBackoff,
		MaxBackoff:     defaultMaxBackoff,
		BackoffFactor:  defaultBackoffFactor,
		MaxMessages:    defaultMaxMessages,
	}
}
DefaultConfig returns the default configuration parameters for the redelivery service.
package redelivery
import (
	"fmt"
	"strconv"
	"sync"
	"time"
	"github.com/ThreeDotsLabs/watermill/message"
	"github.com/trustbloc/edge-core/pkg/log"
	"github.com/trustbloc/orb/pkg/lifecycle"
)
var logger = log.New("pubsub")
const (
	metadataRedeliveryAttempts = "redelivery_attempts"
	defaultMaxRetries     = 5
	defaultInitialBackoff = 100 * time.Millisecond
	defaultMaxBackoff     = time.Second
	defaultBackoffFactor  = 1.5
	defaultMaxMessages    = 20
)
type entry struct {
	msg   *message.Message
	delay time.Duration
}
type Config struct {
	MaxRetries int
	InitialBackoff time.Duration
	MaxBackoff time.Duration
	BackoffFactor float64
	MaxMessages int
}