attributes = new HashMap<String, Object>(attributes);
String name = getStringAttribute(Exchange.NAME, attributes, null);
State state = getEnumAttribute(State.class, Exchange.STATE, attributes, State.ACTIVE);
boolean durable = getBooleanAttribute(Exchange.DURABLE, attributes, false);
LifetimePolicy lifetime = getEnumAttribute(LifetimePolicy.class, Exchange.LIFETIME_POLICY, attributes, LifetimePolicy.PERMANENT);
String type = getStringAttribute(Exchange.TYPE, attributes, null);
long ttl = getLongAttribute(Exchange.TIME_TO_LIVE, attributes, 0l);
attributes.remove(Exchange.NAME);
attributes.remove(Exchange.STATE);